RECNDROT - Doubt

problem - CodeChef: Practical coding for everyone
solution - CodeChef: Practical coding for everyone
What is wrong in my solution??I already tried many possibilities but still i am not getting it where is my program is failing…Plz help

My logic is same as yours but I’m unable to identify the error
https://www.codechef.com/viewsolution/32363838

Try this test case-

1
4
5 1 1 5

Your answer- 2
Correct answer-1

1 Like