Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

sachyadon's blog

By sachyadon, history, 7 years ago, In English

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

Big thanks in advance.

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

| Write comment?
»
7 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.

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