|
|
Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения | WA #2 | Felagund | 1948. Робот на прямой | 31 окт 2013 02:11 | 1 | WA #2 Felagund 31 окт 2013 02:11 Could you please give me some tests? Edited by author 31.10.2013 02:11 | If you got WA @ 5 | 198808xc | 1948. Робот на прямой | 10 май 2013 17:16 | 1 | Try this testcase: 1000000000 1000000000 -1000000000 The answer is 5. My program uses unsigned int64 in C++, and gets overflow on this case. | Test question | Серовиков Андрей | 1948. Робот на прямой | 4 апр 2013 14:58 | 5 | What's the answer for this test? 3 1 1 1 25000000 10001 1 1 -90000 -999890001 I'm using BigInteger arithmethic and BinSearch, but still WA2... 1) D<0: answer 1 2) sum(0, k-1):f(x1+i) -> as result, we need to compare a^2*(2*k-1)^2 and 9*D what's wrong? Edited by author 03.04.2013 18:40 Output of my (AC) program: 1 2 190523 I used standard C++ double type to solve it - it seems there're no difficult tests that fail it (or such tests are just impossible) BTW, for the case (2) my solution considers two different cases I found bug in logic, but still... 1) D<0: 1 2) a) sum(0, k-1):f(x0+0.5+i) -> as result, we need to compare F(x0+0.5) and a*(k-1)/2.0 + a*(k-1)*(2*k-1)/6.0 -> then multiply by 2 b) sum(0, k-1):f(x0+i) -> as result, we need to compare F(x0)/2.0 and a*(k-1)*(2*k-1)/6.0 -> then multiply by 2 and substract 1 Some more tests: 7 1 1 0 1 6 -9 1 0 -1 1 1000000000 -1000000000 1000000000 -1000000000 -1000000000 1234 987654321 -987654321 100000000 987654321 -987654321 | How to use reals with range 10^18 in pascal? | Shohruh | 1948. Робот на прямой | 7 янв 2013 01:19 | 4 | can anybody explain me how to use reals with big range like 10^18 or 10^19 more precisely in pascal? If you need real numbers with best affordable precision - use long double ("extended" in pascal). Edited by author 06.01.2013 23:12 I knew the solution was k=1 or trunc((1+12*b*b/(a*a)-3*c/a)). but i could not take precision. If you need real numbers with best affordable precision - use long double ("extended" in pascal). F**k, spoiler =( Then you don't need real numbers here - long long (int64 in Pascal) is enough to solve it | why the answer to the first sample is 2 I THANK IT IT 1 | Boleyn Su | 1948. Робот на прямой | 6 янв 2013 14:21 | 2 | why the answer to the first sample is 2 I THANK IT IT 1 because let x=1 then f(x)=0 so it only takes 1 sec I misunderstood the statement. | WA1 Is the first test from task? | Birne Ageev [USU] (Psych up club) | 1948. Робот на прямой | 5 янв 2013 16:03 | 4 | Re: Yes. (-) Birne Ageev [USU] (Psych up club) 5 янв 2013 16:01 Re: Yes. (-) Birne Ageev [USU] (Psych up club) 5 янв 2013 16:03 f**king #ifndef ONLINE_JUDGE Sorry for stupid questions. | Problem about H | mbrc | 1948. Робот на прямой | 5 янв 2013 15:59 | 2 | Will the total dist travelled after k seconds be f(x)+f(x+1)+f(x+2)+...f(x+k-1) or it will be f(x+k-1) just? Thanks! f(x)+f(x+1)+f(x+2)+...f(x+k-1) |
|
|
|