You are given an array A of length N. You are asked Q queries. Each query is of the form L,R, and the answer is the sum of A[i] for all i such that 0≤i≤L and A[i]>A[R].
Print an array B of length Q such that B[i] is the answer to the ith query.
Input format
Output format
For each test case, print an array B of length Q separated by space such that B[i] is the answer to the ith query in a new line.
Constraints
1≤T≤101≤N,Q≤1051≤A[i]≤1050≤L,R<N
For test case 1:
For test case 2: