Some strange things with GCC

Revision en1, by hulm, 2024-05-16 15:37:29

Hello dear CodeForces community!

I was solving this problem and submitted a solution, which should pass all sample tests. However, it is falling on the second test, where answer is 4. Everything is ok on my local machine, but for some reason it is returning 1 on CodeForces.

Next, I went to run the code and see my output on Custom Test. For GNU G++20 13.2(64 bit, winlibs) my output is 1.

But for GNU G++17 I am getting the correct answer!

So, I decided to submit my solution on using C++17, but still getting 1. Very strange.

Please, if you know what is happening, can you help me?

My submission with C++20: Click

My submission with C++17: Click

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English hulm 2024-05-16 15:37:29 1015 Initial revision for English translation
ru1 Russian hulm 2024-05-16 14:44:26 1015 Первая редакция (опубликовано)