Mr. Willy Wonka is very generous. After all, he has unlimited chocolate in his chocolate factory !
Charlie’s lucky visit to the chocolate factory has come to an end and Mr. Wonka has decided to
give Charlie a lot of melted chocolate syrup. There are N walls standing on the ground. Each wall
has a height of hi , i = 1 to N and each of these walls is placed a fixed distance L apart from the
next. Mr. Wonka has said that Charlie can choose two walls. Once he chooses these 2 walls, all
the others would magically disappear. Then, he can take all chocolate syrup that can be
accommodated between the 2 walls (Remember, gravity still works in the chocolate factory !).
The depth D is taken to be same for all walls (inward dimension). Help Charlie choose those 2
walls so that he can take as much chocolate as possible back home !
INPUT :
The first line will have a single positive integer T, denoting number of test cases. For each test case :
Scan an integer N. In the next line, scan an array of N positive integers.
OUTPUT :
You have to print two integers separated by a space : the positions of the walls that Charlie should choose. (first one
lesser than the right)
Sample Input 1 :
1
6
9 1 3 1 7 5
Sample Output 1:
1 5
Explanation :
Charlie would choose the 1st and the 5th walls (with heights 9 and 7 respectively) so the volume
of chocolate he can get is (4L)*(7)*(D) = 28LD which is the maximum out of all combinations. So you output 1 and 5.
Sample Input 2 :
1
5
3 3 3 3 3
Sample Output 2:
1 5
CONSTRAINTS :
Subtask 1: (30 points)
T = 1
1 ≤ N ≤ 103
1 ≤ hi ≤ 102
Subtask 2: (70 points)
1 ≤ T ≤ 10
1 ≤ N ≤ 105
1 ≤ hi ≤ 102