When I'm solving [1303G](https://codeforces.net/contest/1303/problem/G), I submitted with [C++17](https://codeforces.net/problemset/submission/1303/273307557) and [C++20](https://codeforces.net/problemset/submission/1303/273307622)(same code).↵
↵
In C++17, the code passes test 2 easily (109ms).↵
↵
However, the code gets TLE in C++20 (time limit is 6s).↵
↵
I'm confused, is there an undefined behavior in my code or is the C++20 compiler bugged? Please help.
↵
In C++17, the code passes test 2 easily (109ms).↵
↵
However, the code gets TLE in C++20 (time limit is 6s).↵
↵
I'm confused, is there an undefined behavior in my code or is the C++20 compiler bugged?