Problem Description

For each testcase you get n, target and n integers. Output first pair indices i j (0-based) such that a[i]+a[j]=target. If not found output -1 -1.

Input Format

First integer t. For each: n target then n integers.

Output Format

t lines: i j.

Sample Test Case

Input:
2 5 9 2 7 11 15 1 3 10 1 2 3
Output:
0 1 -1 -1

Constraints

Sum of n over all testcases

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next