Same Code gives different Verdict with C++14 and C++20

Revision en1, by dedsec_29, 2022-07-26 12:59:52

Today while solving Sereja and Brackets I faced something strange and unexpected.
First I submitted my code in C++20. Submission: https://codeforces.net/contest/380/submission/165753528 (WA) This gave me WA verdict. Then I submitted the exact same code with C++14. Submission: https://codeforces.net/contest/380/submission/165754010 (AC)

I am puzzled why exact identical code give me different verdicts. I also compiled my code with many flags to catch common possible errors, but I got none locally and on custom invocation. Can somebody tell what exactly is causing this difference in verdict?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English dedsec_29 2022-07-26 12:59:52 756 Initial revision (published)