Hey,
Can someone tell which case will generate error in my code
Problem link - https://www.codechef.com/problems/RAINBOWA
Code link - https://www.codechef.com/viewsolution/60707339
Hey,
Can someone tell which case will generate error in my code
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.
Hey, there are certain cases that your code has not covered.
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.
There can be cases where (a[i]-a[i-1])>1, in this case, the given array is not a rainbow array.
There can be cases where a[i] < a[i-1], in this case also, the given array is not a rainbow array.