So while submitting this 2085B - Serval and Final MEX, I am facing an issue. Even though both the output and answer are same for the test case 3, what is this error ? and why is this error ? Serval
Here's submission link: 311991208
Test: #1, time: 187 ms., memory: 0 KB, exit code: 0, checker exit code: 1, verdict: WRONG_ANSWER
Input
6
4
1 2 3 4
5
0 1 0 0 1
6
0 0 0 0 0 0
6
5 4 3 2 1 0
4
0 0 1 1
4
1 0 0 0
Output
1
1 4
2
1 4
1 2
3
1 2
3 6
1 2
2
2 6
1 2
2
1 3
1 2
2
2 4
1 2
Answer
1
1 4
3
3 5
1 2
1 2
3
3 6
1 2
1 2
2
3 6
1 3
2
1 2
1 3
3
3 4
1 2
1 2
Checker Log
wrong answer Integer parameter [name=r[2]] equals to 6, violates the range [1, 5] (test case 3)
In the third case when you operate [1,2] the length of the array decreases by 1 so the remaining array has 5 elements , you are querying [1,6] which is out of bounds