Expected time complexity

Hello,
I have seen that some problems which have a time limit of 2 seconds showing TLE to solutions that do 10^10 computations in the worst case.
For example, I tried to solve a question from code forces which had the time limit of 2 seconds and the constraints of N and Q were 10^5 each and I wrote a solution of complexity O(N*Q) but still got TLE in one of its test cases can anyone tell me why is it so?? Generally, we consider 10^18 computations per second which is much higher than my solution.

10 ^ 18 is too high.
I think You can do around 10^7 - 10^8 operations in 1 second.

3 Likes

Generally 2 * 1e8 to 5 * 1e8 operations are done in 2 seconds.

Around 10^8 is considered 1 second.

This may help.