

The first line of input contains ‘T’, the number of test cases.
The first line of each test case contains an integer ‘N’, the number of checkpoints.
The second line of each test case contains an array ‘token’ of ‘N’ space-separated integers, signifying the number on each token.
For each test case, print an integer denoting the checkpoint number i, 0 <= i <= N - 1. In case no such checkpoint exists, print ‘-1’.
You are not required to print the expected output. It has already been taken care of. Just implement the function.
1 <= T <= 10
1 <= N <= 10^5
-10^4 <= token[i] <= 10^4
Where token[i] is the token number at checkpoint i, 0 <= i <= N - 1.
Time Limit: 1 sec
Here, we will traverse through the array. And for each index, find out the sum for Alex and Rome.
The steps are as follow:
The key idea here is that tokens collected by Alex = total tokens - tokens collected by Rome - ith token. So, we can cumulatively find Alex’s sum and using the formula find Rome’s sum.
The steps are as follows: