Hi Codeforces,
As I've begun to compete more frequently, I've noticed that quite a few recent contests have ended in a large number of solutions being hacked, leading me to frequently jump hundreds of places.
Some examples: https://mirror.codeforces.com/contest/1182 (B), https://mirror.codeforces.com/contest/1187 (D). (I am not hating on these contests at all, just using them as examples. In fact, I very much enjoyed the problems in both contests.)
I've also heard of a lot of hacks in other contests that occur, such as CodeCraft, where people fail multiple problems from hacks.
So I'm wondering:
1.) Has anyone noticed a similar trend? Is it getting worse?
2.) Is there something that problem setters/testers can do to stop this, or at least minimize its occurrence?
3.) Also, what makes some contests virtually hack-free, while others have so many?
If anyone has any insight, please share it below.
When it comes to whether a problem is hackable or not, it mostly depends on the amount of corner cases it contains and the amount of corner cases covered by pretests.
In educational rounds and div3 round, the pretests(AKA the initial testset which grants an "Accepted" verdict which is similar with the usual "Pretests passed" verdict in the normal rounds) are still usually weak(even though this fact has been improving lately), probably because of their purpose of being educational.
On the other hand, in the normal rounds, the number of hacks mostly depends on how careful and experienced were the authors when creating the testset and especially the pretests. As you may have probably observed in the recent contests, even the coordinators can make mistakes, but in the long term, there has been a massive progress from the times when almost every round had at least one hackable task.
Summing up all these points, I believe hacks and the hackable tasks are something which Codeforces should have, because people will learn how to be more careful next time, but as in every aspect of life, too much of something is bad enough.
Thanks a lot! That's really helpful.
When you say that the pretends are usually weak in div3 and educational rounds, do you have a theory why that is? Does it mean Codeforces should spend more time preparing for these rounds, with the tradeoff of less educational/div3 rounds?
If i remember correctly, Educational and Div3 rounds have weak pretests on purpose, in order to encourage hacking(that's why they have 12h of hacking phase)
Oh, I never knew that. Thanks a lot.
1) you can do your own data analysis! Codeforces has an API, where you can view the hacks per contest.
2) I don't think this is or should be a goal. Hacks are part of competing on Codeforces.
3) That depends on the quality of the pretests that setters / testers employ. Strong pretests are inversely correlated with large number of hacks. Also, some problems naturally tend to have more edge cases which people forget (n = 1, using int instead of long long, etc.). If those aren't included in pretests, then they become ripe for hacking. Easier problems also tend to be hacked more than harder problems because more people solve them.
In general, hacks are better for you — you get a chance to fix your code before the systests fail you :)
Wow, I've never looked at it like that.
Regarding your second point, while getting hacked might not be bad, the fact that so many people are getting hacked is likely caused by weak pretests. Isn't that a problem?
Thanks for the perspective!
I don't see why that would be a problem. Weak pretests give another opportunity to display skill and gain points by hacking others.