Escape One - Help

Hi

This is the link of submission: CodeChef: Practical coding for everyone

This is the question: CHEFZRON Problem - CodeChef

I think I have made the code as simple as possible. The solution is also matching and I verified it in my local compiler as well as by giving custom input. But codechef is giving WA. Please help me. Thanks in advance

Same. My code passed all test cases but got WA

The problem is that your code is too simple - greedy is just wrong for this problem. You pass the sample because the test is small enough that it doesn’t matter.

1 Like

@galencolin Could you please provide me some test cases where my program fails, so that I can rectify it?