I feel making representative test cases available after the competition can be really helpful to programmers in debugging their code. Of course, I understand that this could lead to some users just hard coding the test cases to get an accept but that really doesn’t matter because the competition is over and the rankings/ratings are fixed. It is not really going to help them and they are only wasting their time.
For others, who code up their own solution and when they test locally the program seems to be working on all the test cases that they are coming up with but they are getting WA when submitting, they are either forced to look at the tester or problem author’s solution and try to find any differences between their own code and the tester’s code. This can be difficult for several reasons. One being that many a time the author’s code is cryptic and messy with a lot of macros and the other would be that each person’s coding style varies, so handling of the input can be very different from one person’s code to another. Many a time, when looking at tester’s code, I would end up modifying my own code to almost resemble the tester’s code. This is not very useful given that in any competition, in response to a question, I would intuitively code up the solution in my own natural style, so knowing the bug in MY code will help me avoid future mistakes, as opposed to modifying my code to look like the tester’s code.
And I want to emphasize on the word REPRESENTATIVE test cases, not just test cases. This is because in other competitive coding platforms, like Hackerrank, where test cases are made available, they will end up giving the test cases file containing like 10^9 test cases with huge inputs and this really doesn’t help much, since then we would have to run our code on the input, the tester’s code on the input, compare the outputs to find differences and then drill down on the bug and it’s very cumbersome.
Instead, if we have REPRESENTATIVE test cases, i.e. test cases that represent all scenarios while being concise at the same time, it would help us debug in case we are stuck with the problem for long and feel that we are getting WA because we are missing out on some corner cases.