Please tell me the mistake in my solution

question link - https://www.codechef.com/problems/RAINBOWA
my solution link- https://www.codechef.com/viewsolution/26150757

Consider the testcase:

1
3
6 7 6
2 Likes

i fix that mistake but still showing wrong answer

new solution link https://www.codechef.com/viewsolution/26151128

2 Likes

Consider:

1
14
1 2 3 4 5 6 7 7 6 5 4 3 2 1
1 Like

thank you :slightly_smiling_face:

Happy to help :slight_smile: 20 characters blah blah

1 Like