In yesterday’s Educational Round, Problem C had an intended Binary Search solution. However, I found a C++ solution that performed a linear search and still passed. I attempted to generate a test case that would cause TLE for that solution, and after several tries, I successfully hacked it.
After that, I started analyzing solutions sorted by execution time and noticed that many Python3 solutions were very close to the TLE limit on the existing test cases. A couple of PyPy3 solutions actually gave TLE, while the rest of the 16 successful hacks that I made were all Python3 solutions.
Python3 vs PyPy3: Constraints Too Strict?
The interesting part is that some solutions TLE’d in Python3 but passed in PyPy3. This raises the question:
Were the constraints too high for Python3 to handle?
Could these solutions have passed with some optimization?
Should they have simply used PyPy3 instead of Python3?
From what I observed, the difference in execution time between Python3 and PyPy3 was significant for many solutions. This suggests that while the constraints might have been on the higher side for Python3, using PyPy3 (which has a faster JIT compilation) could have been a better choice for some participants.
Maximum Hacks in the Hacking Phase?
I had 19 successful hacks, but I wasn’t able to hack beyond that. This leads me to another question: What is the maximum number of successful hacks that can be made during the hacking phase?
Would love to hear others' thoughts on this! Have you encountered similar cases where Python3 solutions barely pass while PyPy3 makes a big difference? Also, if anyone knows the exact upper limit on successful hacks, do let me know!
Auto comment: topic has been updated by saiteja (previous revision, new revision, compare).
there shouldn't be a limit on successful hacks, as people can get over 60 like cwz2024 on educational rounds.
I don't know but for some reason I was not able to open the hacking page for any solution after 19 hacks. But good to know about this. Thanks.
I also can't sometimes continue hacking after hacking some people. I think it's probably because codeforces found out that I hacked too often in a short time and gave me some limitations. This may recover in about an hour.