While attempting a question if i get AC in all tasks(#) of subtask 1 with 0.1 as highest execution time and get TLE in all tasks(#) of subtask 2 with 5.0100 as execution time does this mean that my code didn’t even complete for inputs of subtask 2? if not then what should i understand by this?
No… it does not means that your code didn’t gave correct output as needed if you are getting TLE. It might be possible your code is giving correct output what is required.
BUT, it is taking longer time than what is required, i.e. program was compiled successfully, but it took longer time. So, you must try optimizing your approach for solving.
There’s a maximum time allowed for programs to complete, given in the problem and scaled for different languages. One second is typical but other values are possible. You’re using Python - that gets a time multiplier of 5 because it’s an interpreted language.
If your code runs without finishing and without error to the maximum time limit, it is stopped and that task gets TLE, Time Limit Exceeded. (So technically, yes, your code didn’t complete). For a problem with subtasks, you can get partial points if your program runs to accurate completion for all cases of a subtask, and that seems to be your case. On the submissions table, this shows up as “AC” with a number of marks less than the full number possible. On the actual result screen and elsewhere it should show up as “partially correct” (for example with a yellow check rather than a green one).
TLE usually means that the approach is flawed, as in there is a better algorithm available to complete the task. Problem setters establish a time limit somewhere between the optimal algorithm run time and the next best algorithm run time. This serves to weed out submissions which do not use that optimal algorithm. For example, if the optimal algorithm for a problem runs with O(log(N)), the time limit will be set so that a O(N) algorithm will hit the time limit.
It is possible that the algorithm used is correct, but the actual implementation uses excessive resources. For me, my implementations are usually decent, so when I get TLE I begin looking for alternatives to the chosen algorithm.