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