Phantom_Dracula's blog

By Phantom_Dracula, history, 11 months ago, In English

In the most recent Div-3 Contest Codeforces Round 1027 (Div. 3), the 3rd problem titled Need More Arrays 2114C - Need More Arrays I submitted a simple C++ program 321476944 but the checker said it is wrong on  line 5 with the output showing as 2 whereas the output showed 3 in multiple online compilers like codechef and onecompiler , I actually do not care about the wrong submissions but just want to comprehend what the problem might be as to avoid the same in future.

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Phantom_Dracula (previous revision, new revision, compare).

»
11 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

In the last for, you are asking for the $$$n$$$ position, which do not exist. The verdict isn't Runtime error because sometimes C++ just access to the memory space and gets garbage.