Hello Codeforces,
Recently I was solving 1995B1 - Букет (легкая версия) problem. Eventually I came to a solution and finally it passed all the sample test cases, so I submitted it. It gets accepted! But I soon realized that my code was quite complex and I should think for other approach, while doing so I realized that my previous submission should get TLE for some type of test cases.
Here is the 281661933 which gets TLE for below TC, but gets accepted by the Judging system.
2
4 5
3 6 8 9
4 5
3 1 9 7
(Both of them gets TLE).
I figured out that it gets stuck in the while loop which causes TLE.
Eventually I had to look up at others' submissions since I was not able to come up with other solution and it was working as expected(not getting TLE, obviously).
ug