NZEC error in java

Why I’m getting RTE on submitting the problem.Same code gives output when i ran on codechef ide,codeblocks. BUT gives NZEC on submission. plz help me.
Thanks

problem:- link text
My solution:-link text

1

13

1 2 3 5 4 6 7 6 4 5 3 2 1

Your output

yes

Expected output

no

because a perfect rainbow array should always increase look at index 3 and 4 it decreasing

Hope this helps!!

3
19
1 2 3 4 4 5 6 6 6 7 6 6 6 5 4 4 3 2 1
14
1 2 3 4 5 6 7 6 5 4 3 2 1 1
13
1 2 3 4 5 6 8 6 5 4 3 2 1

your output
yes
Expected output
yes
no
no

So, you were getting the error because in the first for loop you initialized (i = 0;i<t;i++)

and then you were using that integer i later in your code so that’s why you were getting that error.

So I changed it to (g = 0;g<t;g++)

[Your solution ][1]

https://www.codechef.com/viewsolution/15178992 your solution

but you’re still getting the WA for a test case