시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
5 초 | 512 MB | 184 | 142 | 128 | 76.647% |
You receive a credit C
at a local store and would like to buy two items. You first walk through the store and create a list L
of all available items. From this list you would like to buy two items that add up to the entire value of the credit. The solution you provide will consist of the two integers indicating the positions of the items in your list (smaller number first).
The first line of input gives the number of cases, N. N test cases follow. For each test case there will be:
Limits
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.
3 100 3 5 75 25 200 7 150 24 79 50 88 345 3 8 8 2 1 9 4 4 56 90 3
Case #1: 2 3 Case #2: 1 4 Case #3: 4 5
Contest > Google > Google's Coding Competitions > Google Code Jam Africa 2010 > Qualification Round A2번