Here are my submissions to TOTSCR. Both are exactly the same codes. But one gives AC while the other gives TLE. Submission 1 Submission 2
What’s happening?
Why was the time limit 0.5 Seconds and not 1 Seconds? @admin , was that an Experiment?
If yes, why conduct experiments during Rated Contests?
The problem was however poorly constructed.
There were 2 problems with time limits 0.5 Seconds. Those time multipliers (5x for Python, 2x for Java etc) should have been updated. If a C or CPP solution executes in less than 0.5 seconds, it doesn’t mean It will take corresponding time for Python or Java (2.5 seconds and 1 second respectively).
These kind of mistakes should be noted prior to the start of contest and necessary changes to multipliers should be made.
What I really don’t like is the solutions to the problems are not tested in major languages.
PS: I don’t have enough credibility to state all these, but still what I wrote makes sense.
0.5 second time limit has nothing to do with this. I think the issue is something else
I don’t think more than 2.5 seconds will be required for python. Your other soln proves that even 0.75 secs were enough
What I wanted to convey was, if it was the fault of Judge, then they should have rectified it before the contest started.
Anyways a non-optimal solution will not execute in given time limit. 0.5s or 1s, it doesn’t matter. Why did they impose such tight time limits, which led to TLE for most of the Optimal submissions during the contest?
It is not fair for those who code in Java, Python and other slower languages.
No, definitely not. If the time limit was 1s, then Python would get 5s. Which means, even if my solution takes 4.8 or 4.9 Seconds to execute, it would have given AC. Not all codes give TLE.
Okay fine, anyways, admin refuses to answer the queries I posted. Let’s leave the discussion and wait for the admin to respond to the queries.
These are my two submissions one and two, they’re way faster and have consistent times. I’m sure the setters would’ve tested in other languages. If anyone gets a TLE using my code above, then I’d agree there’s some problem with the system. I guess the problem is on lines 78 and 79 using NumPy modules and integer conversion. Maybe the test file may not be static. There could be a generator making the tests.
Use C++ bro! It’s almost the time-tested language for cp.
can you please help me with this question . I have posted this question yesterday but got no reply , please help me this.
I am getting WA fot this question . I think its a simple BFS implementation. Here is the question. please help me to point out mistake in my approach. Here is my solution.
Yeah, they did. The problem is not with c++, it’s with the time limit decided by setter. Also, pointing out time inconsistencies as low as 0.01s is kind of silly don’t you think? Physics happens. Humans I don’t think can control that level of time. The better argument is to ask admin to set time limit as 0.3 instead of directly concluding that “system” is incorrect or that the language is not so consistent.
cpp is consistent if used properly
The setter’s correct solution might’ve been to use a better data structure like an unordered map or use FastIO. That’s why the time limit might’ve been 0.5 instead of the standard 1 second. The entire discussion is silly in the first place if the code itself is not efficient.