Bulbul is having an unordered list of integers. She wants to find the indices of the two numbers such that they add up to a specific target. She wants exactly one solution for each input, and isn't allowed to repeate the same element twice. Help her in finding the indices of those two numbers which occur at the very first indices. If no such two elements are found then return -1
The first line of the input contains an integer T denoting the number of test cases.
The first line of each test case contains an integer N denoting the size of the array.
The second line contains N space-separated integers L1, L2, ..., LN denoting elements the List L.
The third line of each test case is target.
For each test case, output two intgers denoting the indices.
If the list contains No Elements then return -1 -1.
1 ≤ T ≤ 10,000
2 ≤ N ≤ 200
1 ≤ L[i] ≤ 30,000
30,000 ≤ B ≤ 32,767
For the first test case,
The list has 4 elements (13, 6, 12, 19)
and
the target is 25.
List elements = [13, 6 ,12, 19], Target = 25
25 can be obtained by adding 13 and 12
or 6 and 19.
The output will be (0,2)
as the index of '13' is 0 and the index of '12' is 2. .
Now, for the second test case,
The list has 5 elements (1, 16, 2, 15, 4)
and
the target is 17.
List elements = [4, 16 , 1, 15, 2], Target = 17
17 can be obtained by adding 1 and 16
or 2 and 15.
Now, for the third test case,
The list has 8 elements (1, 16, 2, 15, 4, 12, 22, 7)
and
the target is 23.
List elements = [1, 16 ,2, 15, 4 12, 22 ,7], Target = 23
23 can be obtained by adding 1 and 22
or 16 and 7.