Why random cases don't break this wrong answer ?

Правка en1, от ashish11, 2018-11-03 23:39:11

I wrote a solution to https://www.codechef.com/problems/INVENTRY during the Snackdown pre-elimination. The code received verdict WA, so after contest I downloaded several accepted solutions, and tested against randomly generated test cases of various sizes (20-100). In all these cases the answer outputted is the same, and presumably correct given that their codes were accepted.

Since there are only two possible characters, I think almost every non-trivial pattern should occur in my tests, given that I tested over 1e6 cases. It also doesn't appear to err due to the fact that the judging is being done on codechef servers (I tested it on ideone).

Could there be a reasonable explanation to this? I obviously can't prove this, but it seems that for any normal code, all cases where it can fail should also be reproducible on relatively small cases.

Here is my code, if you need for reference : https://www.codechef.com/viewsolution/21437285

Теги wtf?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский ashish11 2018-11-03 23:39:11 1003 Initial revision (published)