Actually you can figure out for yourself without running the code if a idea 
will got TLE or not. It is normally if you know the complexity of your solution 
and compare it to problem restriction. For example, it is obviously that O(T * 
n^2) will got TLE in Trouble sort problem, because the size of array might be 
up to 1e5. And this means that your solution needs to do 1e12 operations in 
order to solve the entire set, in worst case. A normal computer can hold ~1e7 
operations per second. And 1e12/1e7=1e5 seconds...but the limit was 20.

You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To post to this group, send email to
To view this discussion on the web visit
For more options, visit

Reply via email to