tatianyi's blog

By tatianyi, history, 6 months ago, In English

I'm solving this problem (2A). After some local tests, I submitted the code using the "MSC++ 2017" compiler(MSVC), as I initially wrote my code in Visual Studio 2022. However, although the "MSC++ 2022" compiler in VS successfully generated the correct answer for test case 1, my code got the wrong answer on test 1, with, even, an opposite output! Furthermore, when I switched to other compilers like "GNU G++ 20" or even "Clang++17 diagnostics", my code was accepted.

So, what happened exactly? Are there some hidden undefined behaviours in my code? Or is it have some bugs in this version of the MSVC compiler that CodeForces currently using?

Full text and comments »

  • Vote: I like it
  • +6
  • Vote: I do not like it