|
|
вернуться в форумWhy WA1? I write program on C++ [code deleted] I Submited it and WA1 After I submited program from this forum - AC I tested programs, they give correct equal answers. Why WA1? File of output of my program equal file of output forum's program. Please, Help Edited by moderator 08.08.2006 17:35 Re: Why WA1? Maybe you are don't correctly show answer Edited by author 06.08.2006 23:32 Re: Why WA1? int t1, t2; scanf("%c%c%d", &t1, &t1, &t2); It's wrong. First of all %c means char, 1 byte. So you have not fully initialized t1, as it is not global variable and not initialized with zero. And of course it's not good way to read input, what if there is an extra space in the end of a line? It's a text file after all ;) And imho there is no reason to write (int argc, char* argv[]) Edited by author 07.08.2006 13:25 |
|
|