In yesterday’s Educational Round, Problem C had an intended Binary Search solution. However, I found a C++ solution 308163822 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!