Anshul_Mittal's blog

By Anshul_Mittal, 26 hours ago, In English

Few days ago, I was practicing some questions. I got upon this question World is Mine. I got a RTE when submitting on C++20. Then, few days later I just ran the same code with C++17 compiler and got accepted verdict. Does anyone have an idea why same code is giving RunTime Error on C++20 but works fine on C++17. The error seems to be out of bound error but still why isn't C++17 giving the same error?

These are the submissions links ->

C++17 submission

C++20 submission

C++23 submission

Code
  • Vote: I like it
  • +4
  • Vote: I do not like it

»
2 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

I also faced the same issue in a different problem. Doesn't seem to find a solution.