Hi Leetcode Support Team,
I'm wondering the how the judger judge the submitssion as TLE. As a guy with some ICPC experience, I was assuming that the TLE is counted by each test case, while the threshold is 1000ms (for C++ & Rust, and x4 for Java & Python). And a solution whose time complexity is within 1e8 (an old yet practical estimation of how many commands could a general computer execute per second) will be considered as good to go.
However, I recently found it is not the case. Like 1530 I came up with a 500* 500 * 10 solution (brute force for sure) which is well below 1e8 but got TLE at test case 112/113, I tried that TLE test case and find it could be done with in 200ms. So I'm wondering if leetcode judge the submission based on total runtime of all test cases? And if so what's the general time threshold? Moreover if the judger is judged based on total time cost, then without test case number the time complexity analysis will be useless (since in worst case you can set 1e10 cases, which can TLE every code even done in O(1)). So could you please explain the logic of time counting?
Thanks