RAINBOWA - Wrong Answer

Hey,

Can someone tell which case will generate error in my code :-1:

Problem link - https://www.codechef.com/problems/RAINBOWA

Code link - https://www.codechef.com/viewsolution/60707339

The following code may give you a helpful hint about the reason for the WA your code receives in the second test case.

Accepted

Hey, there are certain cases that your code has not covered.

  1. According to the constraints, there can be cases where Ai can be greater than 7, in this case, the given array is not a rainbow array.

  2. There can be cases where (a[i]-a[i-1])>1, in this case, the given array is not a rainbow array.

  3. There can be cases where a[i] < a[i-1], in this case also, the given array is not a rainbow array.