|
|
back to boardShow all messages Hide all messagesI've solved 1102 using DFA and reading 1 char each cycle with scanf("%c",&c); - and I've got Time Limit then I've tried c=getc(stdin); - and my program worked for 1.1 second. May be it will help. Thanks!! I've got accepted because of your getc() function. Yes! I got the same problem - now AC! No subject Spatarel Dan Constantin 4 Oct 2005 02:15 Me too ... thanks. I got time limit with scanf but with getc(stdin) i got accepted in 0.484 sec. Nice problem :D. Another hint: if you are using '%' operator in your code, use subtraction instead of it (if you can). For example, code x = (x + 1) % MAX; got TLE, whereas x++; if (x >= MAXL) x -= MAXL; got AC 0.5 good luck I still don't understand,,, is first test so large that I could get TLE? Or it's actually some technical problem?? |
|
|