What to do? If this happens in a contest I’d be devastated
welcome to codechef !
Edit: Always submit in Python3 instead of PyPy3 on Codechef. From my experience, these TLEs only occur in PyPy3 and not in Python3.
Thanks for your help, but even Python3 got TLE (submission link). I looked at your linked post, now I’m really scared of submitting anything in Python on CodeChef
When it comes to Python, super optimization is badly needed. The fact that the time limit for Python 3 is 2 seconds (In general, this should be 5s) shows that there is some hidden optimal approach. You might want to try exploring that.
Also, if possible, we can find if there are any AC submissions in Python.
Thanks for your response, however, as I mentioned in my original post, I have a Python submission from two months ago that passed in 0.5secs, and the same code when submitted today TLEs. When I say I am scared of submitting in Python it’s because of these huge inconsistencies
As mentioned by @akshitm16 , we had encountered these issues recently. Seems there is a problem with the execution environment. Also, for quite a lot of problems recently put on short contests, the default time limit was 0.5s, which means Python gets around 2.5s. Many submissions got TLE unexpectedly. @admin should really consider imposing a time limit of at least 1s and/or improving the execution environment.
The time limit is definitely not an issue here. Had the time limit been 100 s, this would have still got Tle. It’s a bug nothing related to time limit.
@admin Any insights on why this is an issue? Are you making an upgrade to the system due to which this is an intermittent issue?