saba_tavdgiridze's blog

By saba_tavdgiridze, 7 years ago, In English

At first,sorry for my agnorance.So lets say: Everytime when I submit solution in UVa online_judge I get wrong_answer,wrong_answer,wrong_answer,.... and it's very annoying . Even on very easy,one-line problems.In internet there are many solutions on UVa problems ,so after disappointment i looked up others codes and there were nothing to distinguish.So I ask you,What's may be reason of this? thanks in advance!!!

 
 
 
 
  • Vote: I like it
  • -4
  • Vote: I do not like it

»
7 years ago, # |
Rev. 2   Vote: I like it +5 Vote: I do not like it

Possible reasons:

  1. You are reading from a different file/stream than indicated in the problem statement (UVa usually has stdin as input and stdout as output).
  2. Your code has some bugs. Try to find them, or use UVa toolkit or a correct solution to compare results.
  3. You are submitting the right code... to the wrong problem (happened to me sometimes, specially with QuickSubmit option).
  4. Lot of UVa problems want the different test cases separated by a blank line, but samples are only one case. This may lead to confussion if you don't read the statement carefully.
»
7 years ago, # |
  Vote: I like it +3 Vote: I do not like it

Maybe we can help you if you provide a link to a specific problem and your code for that problem(the one you are confident that should get AC but isn't)