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
with the output showing as 2 whereas the output showed 3 in multiple online compilers like
and
, 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.








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.