|
|
back to boardADMINS! YOUR SERVER IS ONE BIG BUG! problem#1437 WA #1 it's impossible; 2 cases: "crash(int div by zero)" or "output limit" but you server give WA WHY!? include <stdio.h> int main() { int N; scanf("%i",&N); int b; scanf("%i",&b); scanf("%i",&b); if (N==0) N=b/0; else while (true) printf("123442343234234343423243242344"); return 0; } Re: ADMINS! YOUR SERVER IS ONE BIG BUG! Do you know what "Output Limit Exceeded" means? Think about it before being rude. Re: ADMINS! YOUR SERVER IS ONE BIG BUG! while (true) printf("123123123123"); gets output limit I know why this program don't work. it's optimization, I must add in last line "printf("%i",N);" in VS 6.0 program gets crash anyway but I realy don't understand, why it gets WA#1 this program on test #1 (0 3 4) don't output anything Edited by author 30.08.2006 12:55 Re: ADMINS! YOUR SERVER IS ONE BIG BUG! Posted by KAV 1 Sep 2006 11:41 Sometimes 1/0 isn't crash :( I tried to find mistakes in one my program so, but didn't receive crash - as you. Compiler tries to optimize your code (+) Compiler tries to optimize your code and do not run last command (N=b/0) because value of N is not used after this assignment. |
|
|