ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1197. Lonesome Knight

Why WA1?
Posted by Compile 6 Mar 2005 14:28
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?
Posted by Piratek-(akaDK) 6 Aug 2006 23:28
Maybe you are don't correctly show answer

Edited by author 06.08.2006 23:32
Re: Why WA1?
Posted by Ivankov Dmitry 7 Aug 2006 13:24
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