Hi codeforces,
Could anyone help me explain why my code got AC in C++20 and C++23 but failed in C++17?
The code is identical for all 3 submissions.
C++17 submission
C++20 submission
C++23 submission
I used C++17 on my local, so I prefer to use C++17 to submit.
Thank you.








to
Thank you
After changing that, it worked.
I don't know why it worked, I think can.size() fit with int
No, can.size() is unsigned, so 0 — 1 = uint32::MAX