| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| why is it not true???? | Victoriya | 1083. Факториалы!!! | 9 фев 2010 23:25 | 1 |
program z; var n,k:byte; f:longint; s:string[30]; procedure factorial1(n,k:byte); var q:integer; begin q:=n; while q>=k do begin f:=f*q; q:=q-k; end; end; procedure factorial2(n,k:byte); var q:integer; begin q:=n; while q>=(n mod k) do begin f:=f*q; q:=q-k; end; end; begin read (n,s); k:=length(s); f:=1; IF n mod k=0 then factorial1(n,k) else factorial2(n,k); writeln (f); end. |
| How to reduce the execution time to minimum? | rainforest | 1011. Кондукторы | 9 фев 2010 00:58 | 1 |
My best execution time is 0.015s, how can I improve the performance? Thanks a lot! |
| Is the question clear enough ? | Ake Tangkananond | 1032. Найдите кратное | 8 фев 2010 19:55 | 2 |
What is the answer to 3 1 2 3 According to the question, the answer should be 1 3 isn't it? But why the correct answer is 2 1 2 What is exactly the sentence below mean? "Your task is to choose a few of given numbers (1 ≤ few ≤ N) so that the sum of chosen numbers is multiple for N" Is it already correct that the answer to the above question is {1, 2} where as the minimum set which its sum divisible by 3 is {3}. (I'm not English native) Edited by author 07.02.2010 23:20 you should print any set of numbers/ so, both answers are possible. even 3 1 2 3 |
| Help | Vilchevski Konstantin | 1750. Пахом и овраг | 8 фев 2010 15:49 | 1 |
Help Vilchevski Konstantin 8 фев 2010 15:49 V zadache Pahom i ovrag u mena WA 2 test. Wse moi testi prohodat. Pomogite razobratsa! |
| To Admins | Fcdkbear[VNTU] | 1276. Train | 7 фев 2010 21:49 | 2 |
To solve this problem we must use 64-bit variable. When i wrote in my code "printf("%lld\n",res)" i've got WA on test number 7. But when i wrote "cout<<res<<endl",i've got AC. My friend had the same problem. So what does it mean? Sorry, i must be more careful and write "printf("%I64d\n",res)". |
| TLE 7 | AiD | 1037. Управление памятью | 7 фев 2010 18:05 | 4 |
TLE 7 AiD 25 авг 2006 23:02 I have TLE on test 7. Why it can be? Requests with equal times should be processed as they appear in input !!! TLE 7 is probably like this 1+ 1+ 1+ 1+ 1+ 1+ ... ... ... ... Edited by author 15.08.2008 02:14 Thanks for your hint (about requests with equal times), i've got AC now :) |
| WA5 | fuch_prog_er | 1742. Тим-билдинг | 6 фев 2010 21:35 | 1 |
WA5 fuch_prog_er 6 фев 2010 21:35 Hello, I've WA5 can you give me some tests,please? |
| How you use so little memory??? | Chabanenko Vlad | 1013. K-ичные числа. Версия 3 | 6 фев 2010 16:32 | 3 |
I do not understand, how to solve with memory 200KB, I have a massiv [0..1800,0..9]of [0..10000], and of course my solve loses with memory and time. I do with standart dynamic, Help me, please! Thank to everybody, I have understood myself!!!! |
| No subject | r1d1 | 1395. Pascal против C++. Версия 2 | 5 фев 2010 21:02 | 1 |
Edited by author 05.02.2010 22:09 |
| wa 12 | unlucky [Vologda SPU] | 1408. Умножение многочленов | 4 фев 2010 21:21 | 1 |
wa 12 unlucky [Vologda SPU] 4 фев 2010 21:21 Try to check your output in case, were coefficient's are negative. For example: 0*z^2-z^1 ans -z It's very important to check output of singums! |
| for 6 test | unlucky [Vologda SPU] | 1408. Умножение многочленов | 4 фев 2010 19:56 | 1 |
|
| what is answer for ... ? | Zayakin Andrey[PermSU] | 1745. Ещё Один Ответ | 4 фев 2010 12:54 | 2 |
4 )(( ( )) ))((( 20 )(( ( )) ))((( )(( ( )) ))((( )(( ( )) ))((( )(( ( )) ))((( )(( ( )) ))((( 200 ())()))))((((((()()())())())(()()()((()(() ()((()())(((((())()))))))))()()))(()(())))))())()(()))((((()))()()(()))(((()))()((()()))()))((((((((((()()))))())()()()()((())())))()( )()(())))(()()((()(()()(()(())()))(()(((((()()))))))(()(()))))()()(() ()))())))((()))())(((())(()))((()(((()()())(())()(()())(()(()())(((()(((()(((())())())()()((((()))(()()))()))((()())()(()))(()())))(()()(())))))(()(()(()())( )(()(((()()((()(((())))))()()))((())(()))()(())))())(()))())()))()()(())())((()((()()))()(((())))))(((( ))))()()()())((())(()()()((()))()()()()))(()))()((((())()()((((((())(()))))(()(((((()()())(((((()))(())((()())()())()(((())(()))()()(()))())((())()(()(()( ))(()()(((())(()((((()()((((())()())()()))(()((()()(()))((())))(((())())()((()))()((()()()))(()))()((((()((()(()(((((())))()))))(()))()(()()( ))((())())((((())())(())))))(( ())(( ))()))))))((()(((()))))(())))()()()))((())))))(()()(()(())()))((()()((((())(()())()())((((((())()(((()())))())))((((())()())(()()(())))(()((((()()())(()))(()()(())))) ()))()()(()()(()(())))((())))()))()))())()()()))()(()())())))())))((())()))))())))(()()( ()())(()()))()(()() ))))()(((((()))()()()(()()(()()()()))((((()(())))(()())))))())((((((((())(())()()(((()))()))))()))(())))()))()((((())()())()))()()(()))()()))()()))((()()()())))()))())((()())()()()(()(()()()(((())()( )(((((())))()(()))()((((((()))))())()()())))))()((()(())))(()()(((())()))))())()(())))())))()())(((((()))(()(()))(())())(((())()()))((()(())()((((()()))))()((())))()(()()))((())(()))()()))()()) )())())()(()((())))()()(((())(()(())(())((())()))((())(())((((()))(())(())((((())))((()(()((())())()))(((((()(()))(()))()))(()((()(())()(((())())())()(()()())))((((()(((())(((()(()(())(()(())()(()()) )())())()()()(()))))())(()())(((())((())()()()()(((()()))())())((((()((((()((())((()()))(()))(()()())(((((()(())())((()()))()()()))())))))()))(()())( )()()()(())()()()))))()))((((()(((((()(((()(())))(())()(()())()()))((()((()())(()()((())(((((()(()(())))())(())((()(((((((()(())(((()())))(()))())(())()(()) ((())()(((()))()))(()()))()(())(((()()()(((()() ()))(())())((()))((()((((((()((())((((())))(()((()(()()(()((())))())())(()()())))(((((()(()((()()()))( (()(()(()(()()()(((()()))(((()()()(())()())()())))(()())( ))((((()())((())()()())()))()(()()(((())()((())())))()()())))())(((())))))(())(())(((()((())(())))(()())(()(()((())()(())(((()()()(((()((()((())((((((()()))()())())))(()(()()))))((()))((()( (()()(((()())()()(((((()()(((()()(( ())()())()()())(( ()()) )((()))()(()))))(()((((()))(())())())())()((()()(()(()(())(())))()(()()()()()()(()(((()(()(()())())())((()())())()()((()()()))())((())(()()((((()(()(((()(())((()())))(()))()()(())(()(((()))) (())))))()())()(()))))()))()))))(())())()))()))(()(())()))()()(((()()()((()))(()((()()()()() )(( (())((((()(())()()()()(())(()()((()()))())()(((()(()(()))))()(()()) )((()))(()(()(()))())())))()()))()(((((()))(())))()()))(()()()(((())(()((()(()()(((((()((())((())(((())((()((((())) ))()))(())))(((((()))())()()))))()(()((())(()(())))))((()(()()(((()(()((()() ())(((())()())()())))()()))(()((((()(()()()))()((())((()))))))()(((()(((())(((()()(())(())))))( ))))(()()))))((())(()))))(((()()(()())((()((()()())(()(())(((())))((((((())()(()))(()()))))()()(((()(((()(())()())))(()(())(()))((())()()())(())(((()()))(()((())()()) ()()()())((())))(()(()((()((()((()))(()(((((((( )))))))(()())())()(())(((()()((()(()(()))))()))))(()))(()(()(()((()(())))()(())()()(((()))(((()))()()())(()(()()()()(())()()(( ))())()((())()())(())((()(()(()))((())))((())())())))())(())()(((((())))(())())))))())()((()()))(((((()))(()((())(()((())((()(()())()()))((())((()())((((())(())))()()(((()))()))((((() (())))(())))))(()()))(())(()((()(())(())()())))()()(((()())(()()(()(()(())(()))()()))()((()(())(()))()(()))))())))()()))()()()))()()()( ))))()(())))()())))())(()))())))())()((()))()(()(((((()()(()())(()))())()(((((())))((((((())))(()(()(()()()(())((())(())))())))(((()())))))()))))(()(((((()()())(())())()(()()()()()())((()))))) )())()())()))))))())))(()))(())(())()((()())(((((((())((()((())((())()))((()))))()())()))))()))))(((((())(()()((()())(((()))))(((((())((()(()(())())))( )())(()((((((((()(())))()))))(()()()))())(()))(((()()()))()(())))()(()()((())()))) ()))))()))(()())(())))(()()(()))(()()))(((()(((()))((()(()(()((((((()))()())))())())))()(()())()()))())())(((()(())))() ()()))()))(()))))))))()(((()(((((()()(()(())(()(((((())))))(()))))(((((((())(((()((())(()(()(()(((()((((()())(()(()(()(((()()()())(()))(()((())()()((()))))()))(()))())) )))()()))))(((()(()))))(()())(())())()))()))())))()(())((((())(((()( )()))))(()))))(()))))()))())))()()((())()()(( ((()()(())())( ()(())))()())(((()))()())))()))((()((((()((())())))(((())))())))))(()())))(())()(())(()))()(((()()))(((()(()())()))))(())))()))(()()((())())())))))((())(()()((()))()))(()))())(())(())))(()) ())(()()))(()((())(((()())()((())()()(()()((()()))((( (()((()))))))(()((()()(()())))()())))()()(((()())()()( )(()))(()()((()()(()((()((()(((()))()(()(())))()))((( ))()()())(((((())))((())())))(()((()))()()(((((((((()(())())))(()((((((((((()()((()(()(()))()())()) ))))))((())())))))())()))))))))()()()())()))(()))(()()))(((())()))(())))((((())))(())((()(()))))))((((((()(())))()))))))((((((((()())))((()()()))()((((()(()((())))()( ()()()))(()))(()())(((()((())()((()))((()))))()))()()(()(((()())))((()()()))))(()((()())())(((()))))())()))(()((()()(()))()(()()))()((())))()))()()(()))(( )()))())))()((()((()((()()))(()(()))))((((()()))(((()))()(((((()((((())()))(()((()(()()()()())))((((()()))))())))))((((()())())))))()((((())(()()))()((( )()))))()(((())()()((((((()()())))()())())()(())(((((())()))()((())()()))(()((((((()())()()))((()()())))()((()((()(()(()())((((((((() ))))(()(()()())))))(((()(((()((()))(((()())((())(()((( ))(((()((()))(()))())((()()()((((())())(((())((()))))())()(((()()))(((()))( )))(())))())(()(())())())))(()(())()()(()()())))))())()))((()( ))((())()(()))(()(()))()()()((((()((()))))((((()(((()))()()))())()))(()))()()((()))()(((()(((())())()(())()))(()(())()))(((((((())((((((()(())))(( )()))())() )))))(())()(())()(()))(())(()(((((()(()(()) )( )(()(())()())))((())()(())(())(()()(()))))()(()()()()(((())(((((()())((())))((())))()))(()())))())()))))()))(()()()(((( ()())((()()()()(())()(((())(( )()())))(((())()(())())()))))((((((()))(())))()((()(()(()(())))))()()(())((()((()))()))()(())))))((((()(()())()))(())))()((()))(()()()())(((()(()()))()())(()(()()(()(((((()(()()((()(( )(())(() ((()((()))())(()))()(())()())())))())())(((()))))))(())((()())()))()))()()(()()()))()(())())()((()))))((()()())(())((((())(())())()()))))())))())()))))))))))((((()((())())())(()))((())((()(())(()()()) )(()((()())(((()()()))())(())(()(((((()(()()))())(((()((() )(()()))))()(())()(()))))(()()()()((()))((()(()(()(((()(((()((())(()(((((())()()(()((()(()(()())()())()((())(((())()(())))(()(()()((()(()())))((())())()(()()())()((()()(()(()(((())(((()))))))())(( (()((())()(((((())))))()()(()(((()(()((())((())(()))(()()()()))))(()())()))))(()(((())()))((())())()((()())()(((()()))())()(()((()()(((()((())(()())(()))(())()(()()()( (()(()())(()))))()()(((())))(()(((()(((((())()))(())())(((((()()(()((()((((((()(()())( )(())(((((()))()()(((()(()))()())()(())(()(()))())())(((())()))()()(((()((()))))((((()))) )(()())(())))(()(((()(((()(()())()()))))))((()))())())))(())()(((())()(((()))())))))))(()()())))()(()())())))(())()())(())))((()(())()()())(()))(((())(((()((((()()()())(()()))((()()))(()())(( ()))))))(((())())(((()(()()()(()())(((((()()())))(()()())())((()() ()())((()((()()((((((())(()((()())()())()(())(()))))())()()()))()())()()())))()())())())((()))(()(((()((()(((((((()))((()))))())()()()(()))()(((())((()())()))((()()((((()()(()(()()((()))())))() )()(()()(((())((())())()))()((((()(()(()))((()()()))()())()()))())(())))))(()((((((()()()))()(((()))())))())))))((())((()(())))(((()()(())))))(()(()()(())) )))())()(()(()))((()())((( (())))((()))))))(()())()()((())())((((()))(()()())((()())(())()()))))(())))))()))(((()()()(())))())(())))(())())()()(()((()((((((()))()))()())((()()(((() (((()())()((((())))(())()())(( (())())())((())(())(())(()()(()(())(()(())()(()))((()(()()())))((())()())())(())())))(((((()(()))((()()())(((()((())))((()()()())(()))))))((( ))())(()))))))))()())(())(()()(()()()())()((()((())(()))())(()(((((())()((())()()(((((( )(()(((())((())())))()(()()))()))()))((()(()))(()())((()(()())))()()(())())(()))))(((()))()(()()(((()((( )()((((()()))(()))(()()(()()((((()(())((())()))))))()(()))()()())((((()(()))((()))()))))))))(()(())))))))(((((()))()))))((((()() )(()))))((())))(((((()(((()(()())()))))))((()))())(((((())()())((())(((())))(())()((()()))())((()))(()(((()))())))((((()())()))()()())(()(())()()(()(())()((((())( )())()(()()))())()(())(()))))()())))(()))()))()())))))))))(())()(((((())))))(())()())()((((()(()((()(()()()))(((((())())(()())()((()(()((() (((())()()()))))))))(((((())()()))()(())()()(()))(())))))((()))( ()))(()()(()))() ((((())))((((())(()()()(((((())()) (()(((())((((()(()()))))()))(((()()())((( (()()(())(())((())))()(())()()))))()())((())()())()((()))))()))))((((()))))(((())((((((() ))(()()((())())((((()()))(()(()))((( )()()())))((())))))())()(()())())()(())))))((()())()()))))()()()(())(()(( (())(())())())())))(()()()(()()))))(((()))((()((())(()()(()())))())())))(()(()(()())()()()(()))()( ()))()))(((((()(())))((()()((()))(())()()(())((((()((())))()()())(())))(()((())(())()()()((())((((((((()(((()())()(((()((()( ())((((())())(((((() )((()(())))()(((()((()))))))(()(())())())(()))(())))))())(((()))))(()()(())()) (((()(((()()(((()))())()())(())(()))(()))))((()((()()(()))))()))(()()()(()())))()(((())(())))()))()))))((()()((((()((()()(()))(()))((((()(())) )(((()))())(()()(()()(()())(()()((((())(())(())(((()((())((()))()())((( ))((())()))))))()()()))))()())()()()()(())))()()))()))(()())((())((())())(()()))()()))(()())(((())((()((((((()()(())))()()))))(((((())()())())((((( ))(())(((()()()()((((((())))(()((()(((()))()))))(()(()((())))(()(()()()(())(())))(())(())))((((()(()))(()((()())))((())()))))() ())()) ))))()())()(()((()((()())()((((((((()))(()()())(()((()))()(())())(((())()))())((()()))(()())(()()()(()))(()(()())))()()())))()(()) ()()(()((()))))))(())))()())(()((()())))()()(()(()(()()))))))))()(()(((((((())))(()(())()()))((()(((()()(()(()))()))))()((()((( ()()()(()()))))()()))))(()))(()))(((()))())))(())(((())))(((()()(())(((()()((()(()((((((((())())))()()))((((()))())(()(((((()(())()((()))()(()(()()(()())((((()))((((()()))())()()((( )()(()())))(()()))()(())( )((()()((()))(()))()))()()((())((()())))((((())()()(()((((((() ))) (((()))((())()((((((()))))()()((()((())())))((()))))( )((((((((()))((()(()())))()()))()))(())(()()))(((()))))()())(()(()))(()))))())()))))))())()(()))()()))()()))(((()())))))(()(()))()()()()((( ()(()))()))())))())())))()( ))()))()()))(((()()))()((())(())(()(()()()(()))()))((())()(()()(())()(()())())((()))()))()(((())())))(()()(()()(()()(()))((( )))))))()())(()((()()(((((()((()))(()()((())()))()(()(()((()))()()((()((()(()))))()((())(()))()())())(())))()())()()))((()((())))(((()))(((()())(()()(()()) ((()(())(()((()(()(()(()))))(((()()))())()))))((()()))(())))((())((())((())((((()())))(()((())))(( ))))))()((())))))((()(((((())())()(()(((()))()()((((()(()()))))(()()()())(((()(()())((()))()((()(()))(((())(()((()))((())()((((())()( ))))((((()())()((())((()))())(((()))))(((()())((())))))()))()()))(()(()())))((())())(((((())()())()()))))())())())))))()))(())()()(()()))(()()()))((())((()((()()(((((()))((())()(((((()()(())(((( ))))(())())((()(()())()(()()()))())))()()))(((()))(( ((()())(()()()(()))())()))))((()(()))(())()(())))))())(())()(((()(())())()))))())())((())((()())(()(())))()()(()))((())()()())(()()()))())()) )((()()()((((()())))(()(((())))((() )))))()())))()()())()(()))()()())(()(((()))())()()(()))))((())(()()())))(()()())))()(())(((()(((())()(((()))()))(((())()))())())(((())))()))((((((())(()(())))(((()(())())))))(()((()())( ))()))()((())()())))(()(((((()(()))()(()))()))(())))((()())()))()( )()()((((()))(()))()(()))))(((())(()())((((((()((()()())())((()())())(()())(())))))))()))))(()()))()(()())(())()(((((((()))(())))()(()())())((()(()())(() ()(()((()((((()()((()(((()))))))))((()))()(((()()())))(()((((((())()()(())))()(()()( ))))))()()(())(()()(())(()))()))(()))))()()((()((())))))(((())()))())()(())()(( ))))))()(()())))((() )(())()()))))(()((()(()()(()())))))))((((()(())))()((())() )()))(()(()))))())((((((()())((())())))())(()(()()())(())((((()))))))((()())))))))())(()())(()(()(((( ))())()))())(())()))))((((((())(((())))((()()())()((()()))()() ())())()()))()(((()()())(()()(())((())((()))(()()()())(()())(((())))()(())(()()))))(()(((()(()())))())(()((()(((()(()()())(()())(((((((()((()((()())(() ())())()(((()())) )()))()(()(()())))()))())))()(()((((()()))(())()()(((()))((((()))()) ))))((())((()(()))))(())(())((()()(())((((()())())(()))()()()()))()()(((()())))()(()((()(()(((((()(())((())())(()( (())))))()())()((()(()()()(()()()()(())(())()(()(())()))(((((((()))())((((((()(()()))())))(()((((((((()((())((()(((())(())()(((((((()))()(())))))()()()((()()))((())))()()((()((()())()())())()((()(())) )(()()))()))(()())()(()))(()))(()))()((())(())))))()())))((((()))()(()((()((()()()()())(((()()))))()(()(()))(()(()(()(()))))))(((()(())()(((( ((())())(()()((()(((((((((())(()(((())()))()(((((()()())()())()()())())(()))(()()))((()(()(())((()))()))( (()())())))()))()((((()))))(())(())()()()((()())(()(()((())((((())())(()())(())(()(()(()))()(())((()())(())()))))(()(()()())((()()))()()(((())))()))()((()())))(((()))))))))))))))((())))(()) ())())(()(() ((())())(()))((()(()()(((((((((()()))())()(()(((()))))()()((()))(((()()((((())(()))((()(()))(()((((()(()((()))))(())()((()))()())()((()()( ))((()(())))(()))))))))())))(()))())))((()))()((((()()(()()())()))())((((((()))(())())()())((())(())(()))()))()((())()(())())()(()))()())())(()(())()((() ))()))((())( )))((( ))()(((())(()())(((()()((((())))(((((()((()()(())((())())(()))))()((((((()((()())()())()()(()(((()(()()(())(()())()((((()((((())(()(()))))()()(((()(((())(()))(())))()()())((()()())()())(()))))())) (((((()())(((()))()()())(()()(()())(()()((((((((((())))(()(()()(())((()()(((()))(())()(()((())(((()))(()))))())()())))(())()))())()(()(()()((( ))()()())())()()((()()(((()()()(()(((((((())()))((()(( ()())(()((()(()))())(((()()))))((()) (((())))())()((())()))(((())())))))(((()((((((()()))(()())))(())(((()(())))))()(((((((())))()()((())())(()())( ((()())))))()()))()((())()(() ())(())()()((((()))))))(()))()())))))(()(((((())())())(()))(((()((((()((()))(()()())(()((()))))))()()()((())(()))())()))))(((((()()((()()))()))()))(()())((((()()(()))((()()())())())( ))))())(()(((()(()()()))()()((((()()))())(()))())())()))((()())()()( )()()(()(())(((((((())((()))))))()()())())))((())()))()(()()())) (((()( ()()))(())()()()(((())()((()((((())))(((()))())))()()((()()(()((()((()(()()())))) )()((()))((((())()(( ())()))())(()()()))()))(()))())))()()() () (())()())((()))))))())((()(()))()((()(()()(()))))))()(()(())())()()))))))())(()))((())(((()(()())))((((())()())))))(()())()())()(()()(()((()(((())()((((((())())(()()) )(())))((()()(()))())(((())((()))((())()))((((()(()(()(((( )(()))()))((()(((((()()()()()))((()(()))))()(()(()))()()))))()(((((()())()(()((()))()((())((((()())))((())()()()()(((((((()))))(((((())))(())())))(())()()))())())()))()(()))()))(()()(()()((())() ))()())(()))()))()))())())))()(()(()))))))((()()((()((((()((((()())(()(()()((()()((()())())((()()(((()(())()()((((()()((((())()()()())))))) )()())((())))))(())))(()(())(( ))())()())()(((()())()())())( ((()(())(()()(())(()(()()(((()))())((((()()))())()((()()()))(()))))))((()()())((((( )(())(()())()()))(())()()))()(()))))) ) ((()))))((()(()((((())(((()()((()))(())(((((())(( ()))()())))(()()((())(()))))(()))())())))(())())))((((()()())))))((()(())(()))))())())(())((())))))(()()()(()()(())((())(())))))))(()((((( (())()((()((()(())))())((((((() (()))(()((())()((()()()(())))())))(()())()))()())())))( ()())()))())((()())))()))()()())()((())())()(()(()))))))((())))(()(())())())(()(()(()()()(()(())())(()(()())((()()))))()()(())))))) ()(()))))((()(((())))(((((())()(()(()))((( ()())()(())))()())())(()()))))())))()))(((()()())())((((())(((()((()))))())(())()((()()(((((()(((())(((()(()))(())())((()( ((()))))()(())((())())()))))()())((((( ()(())))((((()(()))(()()((()((((())(()()())(()))))))(()))()()())()))))(((((((()())()(()(()))))(((()((((()))()(())))(()()((())())()))(()()()()()()()(()()))(()))())(()())())(((()(())(((())(( ))))())(()))()((((())))((())((((()(()(())()(())((()())))( (())())())(((((())((()((())()((()()()((())())(()))(())))(())()))())((((((()())(()))))())))(()()()(())(())()(()(()())(())()((((()()())))())()())())()((((()(()))( ((())()())()()(()(())(()))(()))))((())((((())))())()))())()))()()())))()())())((((()()))((()((((()(())()(()()())))))(()()()))(()(( ((()))(((()))())()))())))((()()()()))(()()((())))((((())()))()(()))))))())())()) ((((())((()()()(()(((()(()()()())))()))))(((())()(((())) (((())())(())()(()))())()))(((())()()()))(((()())()()()((())()(()(((((()(((()))(()))((()(()())(()))())))((((((())())(((((()(((()((()(()())())(())()((( ))()(())))()((((((())))())()(()((((()())())(())(()))(()(((()((((((((())())))()()())())((()((())()(())))( ))()(()()((()((()( )))(((()())) ((((((()()))))(()(())))))(())()))()(((()))))())()))(()(()())())()((((((()((())))(()))()()()(()))))(())())()()())()(()())) ((((()()(((()))(((())(((())(()(()()()))))())()(()() (((())()())(()))()(()) )))((()))(()(((()))()))()))(()())())())))))(()(()))()(()())((()()()()((()())))()((())))(()())((((()())))()()(()(((()(((()))()()()(())(())) (())()(())()() )((()(()()()))((())((()(()))())((()())))))))))))(()) )((()((((()))))())())(()()((())()(())(((())(()))()()()()()))((()))()(()(((()))))(()))())))((())())((())())()))))))))))))(())(((()(()()(()))())(((((()(()(()())()(())((())))(()()))()()(()(( )())))(())((())))))())(()(()()))))))())(((())()())))))() )(())()(()())))())())(())(())()()()))(())(()(()(()))))))))() (())(((()))(()()())()(((()())())(()((())))))(()()((()((())()(()(()(((()()(()()()(()()((()))) (((((()(()))()))())))))((()()(((()()(((((()()(()()))()((((()(()))(()))(((()((((()))()()()))(()(((((()()))()()))())()())))()() ()()))()())(((()(()))(()()()()()((()(())(((()((((()(())))()())))(()(())))())(((((((((()))((()((())((((((())(((((()((())(()()()())(((((()()((()()()))()(()))()(())(((())))(((())((((()()))())((( ()())(()()(())))(()((()(())(( ((()((()))(((())()()(()()((())(())()()))(())())(()()()((()())(())()()())()))() ((((())(()))((()((()((()))))())()))()))(())()((((())()())()(((((()))()())()(()()(())((((()())((()()()()))(())())(()(()()(())(()))()((())()()(()))(()())((()())((((())))()())()())(((()))())()( ())))()(((((())))(()((()))()((())(()))((())(((( (()((()())) )) )))()(((((())(((())()(())((()))()(((()))())()))()))()())))(()))()()))())()()))))()()(()(((())(())))(()(()))())))))()(( )))()((())((((((((())(()())())(((())))((((()))))(((())(()((())())))((((()((())())((())(((())))()()))(()))((()))))())))(())((((((()(()(()((())(((((())))()((((())(()))))))())) )()()((((())((((()()( Edited by author 04.02.2010 11:20 6 3 2 1 3 48 15 18 5 9 13 17 4 8 12 16 20 3 7 11 15 19 18272 184 120 152 106 196 193 184 175 28 182 181 159 189 132 68 140 20 77 9 96 194 60 18 116 135 70 64 142 62 172 57 55 46 139 48 134 104 98 7 192 111 149 89 176 78 19 49 154 138 15 167 190 191 195 199 75 126 92 170 155 25 177 129 73 82 1 100 130 143 31 53 21 72 6 171 4 59 52 54 17 67 95 29 80 110 32 63 30 112 35 102 41 79 168 156 113 83 97 38 50 101 131 153 71 76 186 10 88 34 42 16 173 124 125 163 13 26 109 117 145 169 128 119 65 61 183 5 2 81 123 157 56 43 47 37 90 107 136 114 121 122 3 40 8 11 51 91 146 137 144 198 23 36 108 12 165 118 74 84 179 127 103 158 161 14 166 151 39 147 185 160 187 188 45 58 133 85 174 99 115 24 197 94 105 180 |
| Please write answer for test "2 1" | VasilySlesarev | 1359. Стройка | 4 фев 2010 00:47 | 4 |
My program writes 0.8561 and gets WA I`ve found stupid mistake and got AC! Doski ne mogut bit raspologeni gorizontalno! Thanks, i had this mistake too :) It was WA #3 |
| java.util.Scanner | Konstantin Yovkov | 1510. Порядок | 3 фев 2010 23:24 | 3 |
I got AC with O(n) ! Several times I got TL, but when I stopped reading the input with java.util.Scanner and started using java.io.BufferedReader it worked. java.util.Scanner is too slow, don't use it ! class Scanner { StreamTokenizer in; Scanner(InputStream stream) { in = new StreamTokenizer(new BufferedReader(new InputStreamReader(stream))); } void asserT(boolean e) { if (!e) { throw new Error(); } } int nextInt() { try { in.nextToken(); asserT(in.ttype == in.TT_NUMBER); asserT((int) in.nval == in.nval); return (int) in.nval; } catch (IOException e) { throw new Error(e); } } } ".. and nothing else matters ..." (c)Metallica |
| where is my mistake? | ooo | 1407. Раз-два, раз-два | 3 фев 2010 21:00 | 2 |
#include <iostream.h> bool z(int); void main() {int n,i,q=1; cin>>n; for(i=1;i<=n;i++) q*=2; for(i=0;i<10000;i++) if((z(i)) && (i%q==0)) {cout<<i; break;} if(i==10000) cout<<"No solution";} bool z(int x) {int j=0; while(x!=0) {if((x%10!=1) && (x%10!=2)) j++; x=x/10;} if(j==0) return true; else return false;} Imagine that n is 100. q (2 ^ 100) will be overflowed. You must have 10000 digits but not number under 10000=) |
| Please help me!I have MLE #8 | Tigran Hakobyan(1 course RAU) | 1423. Басня о строке | 3 фев 2010 14:12 | 1 |
Here is mu code(C++): #include <iostream.h> void sdvig(char a[],int n) { char *y; y=new char [n]; int i,j,total=0; for(i=0,j=1;i<n,j<=n;i++,j++) { if(j==n) { y[0]=a[n-1]; } else { y[j]=a[i]; } } for(i=0;i<n;i++) { a[i]=y[i]; } } bool proverka(char x[],char y[],int n) { int total=0,i; for(i=0;i<n;i++) { if(x[i]==y[i]) { total++; } } if(total==n) return true; return false; } const int N=250000; int main() { char x[N],y[N]; int n,i,total=0; cin>>n; for(i=0;i<n;i++) { cin>>x[i]; } for(i=0;i<n;i++) { cin>>y[i]; } if(proverka(x,y,n)==true) { cout<<"0"<<endl; } else { while(true) { total++; sdvig(x,n); if(proverka(x,y,n)==true) { cout<<total; break; } else { if(total==n) { cout<<"-1"<<endl; break; } } } } return 0; } |
| WA4,here is the test.. | mariam kupatadze | 1576. Телефонные тарифы | 3 фев 2010 12:08 | 2 |
When sum<=T (which means that the limit is not exceeded ) you should write just a monthly fee N2. In C++ : if (sum<=T) cout<<"Combined: "<<N2<<endl; Good Luck Friends!!! |
| What is with the damn 10 test? | Gheorghe Stefan | 1154. Сражение магов | 3 фев 2010 01:26 | 5 |
I got WA at test 10... I compared my source with an AC one and got same results on many tests... oh God I've wrote if (H == 13) H = M = S = 0 and got AC ! In test 10 you may have a precision problem. When comparing double values use some epsilon like 1e-9. It worked for me at least... I rewrote everything to long arithmetics and fair fractions, still WA10. The problem is that the answer is 00:00:00. I checked only control points (moments of power and weakness for all 4 forces), but if resulting function is minimal and constant on range [x2;24*60*60) U [0;x1), then the answer should be 0. Simply adding 0 to list of points to check gave me AC. I believe solution with 'double' type would also do it :) Edited by author 11.08.2008 08:58 Oh, thank you very much! I added zero to my check list and at last i have AC now too :) (I had WA #10 before it) |
| How to get AC | OleGG | 1059. Выражение | 2 фев 2010 20:28 | 2 |
Well, everybody here knows, that best scheme is 0(X*i+) . But lot of us get WA1. I've found why we fail like this. The last line of output shouldn't contain line break, so I've changed string "X\n*\ni\n+\n" to "\nX\n*\ni\n+" and got AC. OMG. It is very strange :) for (int i = 1; i <=n; i++ ){ out.printf("X%n*%n%d%n+%n",i); } (Java) |
| wa5 with O(N) | wRabbits_AlMag(VNTU) | 1130. Никифор на прогулке | 2 фев 2010 15:01 | 1 |
any hint? while i have more than two vectors, i find two of them with |sum|<=L. in the end i have two of them and try to sum in different ways, but wa5 |