Submit | All submissions | Best solutions | Back to list |
AHMAXAVG - Math Assignment |
There are many brilliant professors in FCI-CU, one of the most brilliant professors is a Math professor called Ydah Ledba. Professor Ydah Ledba gave his students an assignment. Students were asked to do the following: Given a set of unique numbers, determine the 2 numbers with the largest average (The average of X and Y is (X + Y) / 2) from the set.
Help the students with their assignment.
Input
The first line contains a single integer T – the number of test cases (1 <= T <= 100). Then follows T lines, each line contains an integer N (2 <= N <= 100), and then N numbers (0 <= Ni <= 1000), separated by spaces.
Output
For each test case, print a single line containing the indices (1-based) of the 2 numbers separated by a single space, in ascending order.
Example
Input: 2
3 1 2 3
2 2 1 Output: 2 3
1 2
Added by: | eagle93 |
Date: | 2014-06-24 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |