Hi all,
I keep getting TLE on a current competition question. Since I don’t wish to discuss this problem in particular or really anything about the question itself, I will keep things very general.
I have written C++ code that finally gets past the WA barrier and into correct numbers. However, it receives TLE according to the judge. In an attempt to see which problems / corner cases have given it the most trouble, I’ve implemented a simple stopwatch using std::chrono and some timepoint checks. I’ve made sure to include all I/O for the problem before the stopwatch clicks back in. The results are confusing.
When putting in a maximum size input file (according to competition specifications), every single test case comes to under 150 microseconds and all except one (the first one, which reads the standard fast IO statements) comes under 50 microseconds. Even if the judge file is 1000 of the worst case in my simulated test, that is still only 0.15 seconds. And yet my program receives TLE even in the restricted case!
Now, I ask the question–what could possibly be the cause of this TLE? Is it a corner case I haven’t considered, or do I need to find another way to measure the time of the program that is more accurate? Because right now to me it feels as though the judge itself is flawed.
Thanks,
-Voxelated