Bug in Codeforces C++ Compiler

Revision en1, by arunkumar8202, 2022-09-26 11:01:20

Hello community,

I was trying to solve the question 699C Fence Painting during which I came across a interesting bug in C++ compiler which I couldn't figure out.

I tried to submit to same solution using three different versions of C++ and it gave different result on each run.

C++ 14 : The solution got accepted 173550755

C++ 17 : The solution gave wrong answer on testcase 3 173550802

C++ 20 : The solution got runtime error on testcase 3 173550866

MikeMirzayanov will you please look into the matter or clarify if I have made a mistake. Any kind of help will be appreciated.

Tags bug, compiler, c++, @mikemirzayanov

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English arunkumar8202 2022-09-26 11:01:20 873 Initial revision (published)