|
|
Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения | Hint! | some_programming_novice | 1828. Приближение прогрессией | 29 апр 2019 17:27 | 1 | Hint! some_programming_novice 29 апр 2019 17:27 Let those two partial derivatives equal to zero. | No subject | Felix_Mate | 1828. Приближение прогрессией | 24 дек 2015 20:49 | 3 | Edited by author 24.12.2015 20:50 Edited by author 24.12.2015 20:50 Re: WA 11! Jane Soboleva (SumNU) 24 дек 2015 15:19 Я переписала это на джаве, используя BigInteger и BigDecimal и получила AC. (Спасибо~) Вообще, если возникают большие числа, то сейчас такие задачи легче всего решаются на джаве. UPD: Не за что~ Edited by author 25.12.2015 03:26 Спасибо за советы.Очень бесят задачи,где многое зависит от сложной технической реализации. | wa11 | waterlink | 1828. Приближение прогрессией | 8 окт 2011 01:47 | 3 | wa11 waterlink 19 мар 2011 17:42 is it a some especial test? * Maxim Dvoynishnikov (Dnipropetrovsk NU) 25 мар 2011 02:49 I think it's any test with N>1300. Re: wa11 IgorKoval(from Pskov) 8 окт 2011 01:47 YES! if you use formula n*(n-1)*(2*n-1)/6 and n is long=> overflow when n > 1300! use this: long long n; //!!! Edited by author 08.10.2011 01:48 | WA 14, please give test | Vasily Slesarev | 1828. Приближение прогрессией | 7 июл 2011 21:35 | 2 | Now AC. The problem was with precision. | Someone give me AC solution please | Vitalii Arbuzov | 1828. Приближение прогрессией | 1 май 2011 02:26 | 3 | I've used 3 different ways to calculate simple linear regression and got 3 different wrong results. Please help. My email: Vitaly.Arbuzov@gmail.com Just google the method of least squares. You derive some formulas by hand, solve small linear system and get AC. | why wa 24? i used nested ternary search. what's the idea to solve the problem? | muhammad | 1828. Приближение прогрессией | 21 мар 2011 18:21 | 3 | i used nested ternary search on a and d but wa ( 24 when eps=1e-7 && 11 when eps<1e-7) i figured the function should be like that- f(a,d)=c1a^2+c2a+c3ad+c4d^2+c5d+c6 where c1=n && c4=n*(n-1)*(2*n-1)/6.0 here for n>1 the coefficient of a^2 and d^2 is always positive. so there should be only one(since quadratic) and low peak. so i thought ternary search would do. but why diff wa on diff value of eps. again, i found (by checking for tle) that there are high peaks as well. how can it be? perhaps, i am wrong right on the idea itself. please, guys help me find my bug. and, please tell me at least the method of solving. is it ternary search or some direct math formula or something else i am missing. if ternary search please tell me whether there is indeed high peaks and how did u deal with them... thanks in advance. Edited by author 21.03.2011 17:01 There is closed-form solution to the problem. Read some basic econometrics textbooks, "simple linear regression" section therein. thanks very much got ac. so simple :) | Example | bet | 1828. Приближение прогрессией | 19 мар 2011 17:00 | 2 | Why in test 1 answer: 0.400 4.900 ? If b = 0.400, d = 4.900, ∑(ai − bi)^2 = 1,524. If b = 0.105263, d = 5.026316, ∑(ai − bi)^2 = 0,824 < 1,524. If b = 0.400, d = 4.900, ∑(ai − bi)^2 = 0.700 |
|
|
|