COPS - Editorial

Consider the test input:

1
1 9 3
1
1 Like

Thank you very much . I got the mistake and now it is running correctly .

1 Like

Solution: 48622960 | CodeChef : link to my solution.
What changes should I make to my code for it to work?
Thanks.

Can someone please point out the problem with my code. Here is the link to my code:
https://www.codechef.com/viewsolution/49796754

I know it’s failing but I am unable to get where I have made the mistake.