sachyadon's blog

By sachyadon, history, 8 years ago, In English

Can someone please tell me why the below submission fails -- http://codeforces.net/contest/785/submission/25685104

Big thanks in advance.

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

| Write comment?
»
8 years ago, # |
Rev. 3   Vote: I like it +15 Vote: I do not like it

Hi. Did you attempt to run your program in a debugger? Please step through the code and check which line/variable does not give you the desired value. Do not expect people to do that for you.

Also, could you please describe your approach to solving the problem? Do not assume that people have time to read and understand your code.

In any case, here is a suggestion — download one of the accepted solutions, then create random small test cases to test your program and check it against the correct answer. When one case fails, it is easier to pinpoint where the error is.

»
8 years ago, # |
  Vote: I like it +6 Vote: I do not like it
Hint
Just try not to open this :)