Problem Description

Read n integers and target K, find the first pair in reading order that sums to K. Output their 1-based indices i j (i

Input Format

First line n K. Second line n integers.

Output Format

Two indices or -1.

Sample Test Case

Input:
5 9 2 7 11 4 5
Output:
1 2

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next