In the last contest, Technocup 2022 - Elimination Round 1, there was a problem 1583D - Omkar and the Meaning of Life. I tried to solve it, but got TLE on test 2. Here is my submission: 132282353. The strange thing is that when I tried to test it locally, it worked fast. I counted the time it took for my program to finish (without input: I surrounded each input with block like that:
int current_time = clock(); total += (current_time - start_time); cin >> k; start_time = clock();
), and turned out it took only 16 ms. So, I have a question: why could it be, that the code work without tle on my machine and get TLE on cf server?