Advice to Codechef

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.

1 Like

Are they exactly same?

If yes, why is there so much difference in execution times?

1 Like

Yes, don’t even differ in a byte.

I am not aware of that, it’s the fault of online judge.

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.

Seems to me like a bug. Both codes are exactly same byte by byte. I copied the code from the the TLE link and it gave AC.

1 Like

LOL :rofl:

It would have been TLE even if TL was 1 sec. That’s what I am saying.

1 Like

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.

I just found this. @admin , I think this post is actually reporting a bug. Will I get Laddus? :grin:

1 Like

For such a bug , laddoos are just small thing , will get rasgulla + codechef internship for that. :joy:


Add halwa from my side if that actually happens


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.

Yeah, they tested it pretty well.

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.

I experienced the same in yesterday starter contest.

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.

1 Like