During the cook59 competition I kept getting NZEC but I couldn’t understand why. I verified my answers for all possible input strings up to length 12, and thousands of random input strings up to max length. Here is my code, it uses the same method as the official solution.
After the competition I found the problem: when I read the input I have to say:
String s = scan.next();
String s = scan.nextLine();
I always use nextLine() in CodeChef competitions, and both cases work on the sample input. This means my answer was correct but failed due to bad input. This is very disappointing.
Would the admins consider rejudging the problem (or just people that failed due to NZEC) with input that matches the sample input?