Many of the contest problems on codechef have very weak testcases. This happened with me in the previous contest - Cookoff April 20. For the 3rd problem - MINOPS, I submitted 2 solutions that give different answers for a testcase. Yet both of those solutions were accepted!
what is the use?
same thing happened for POSITIVE MEX problem as well
if test cases are good only in practice section and not in contests…
then better there are only practice problems
I saw a submission for the TRIQRY which was simple brute force and was accepted. But when I tried to submit the same code ,I got TLE.
Were the test case changed during the contest?? https://www.codechef.com/viewsolution/32224750
Test cases never change during a contest. And secondly, how can you see someone else’s answer in the middle of the contest. Please enlighten all of us here.
@anon38910692, bro your logic is correct but its worst case time complexity is O(n^2) for the cases like 5,4,3,2,1 and k = 1. so it should get rejected by TLE
Please check out this post. Here i’ve explained in detail the difference between the solutions and the particular testcase that gets different answers from the two different solutions.