- One
line containing the value C, the amount of credit you have at
the store.
- One
line containing the value I, the number of items in the store.
- One
line containing a space separated list of I integers.
Each integer P indicates the price of an item in the
store.
- Each
test case will have exactly one solution.
Output
For each test case, output one line containing
"Case #x: " followed by the indices of the two items whose
price adds up to the store credit. The lower index should be output first.
Limits
5 ≤ C ≤ 1000
1 ≤ P ≤ 1000
Small dataset
N = 10
3 ≤ I ≤ 100
Large dataset
N = 50
3 ≤ I ≤ 2000
Please kindly send your solution to our G-mail account: codeseekers@gmail.com
And please specify your Name, Branch, IDE Name or Language Name and your own pic.



No comments:
Post a Comment