Regarding CNTFAIL Test Cases

While going through some accepted solutions of the problem CNTFAIL which was asked in the Amritapuri ICPC Regionals. I found this particular solution to generate the following output for this particular case -

Input -



1 3 2 1

Output -


Expected Output -


I think this is a valid test case as per the given constraints because no where in the problem statement it is mentioned that only 2 different values will be mentioned in fact we need to check for inconsistency. I would be pleased if anyone can verify this test case, also if this test case is right that means the test data for the problem was weak.

1 Like

@tejas10p This Test Case is valid for sure. This means the test cases are weak.

Thank you for verifying

Or maybe it can be some internal server error as well.

Refer to this link

As the problem appeared in ICPC Regionals, the probability of weak test cases is very low, and atleast I didn’t hear it from anyone after the event.

But in the replay contest, it is very much possible.

Weak Test Data was the least of my concerns, I only needed to verify my approach and the test case in general. With no disrespect towards the author of that solution, the flaw was clearly visible in his loop and there is a very low probability that any of the teams onsite would have ignored such a case.