Problem: Bala's room is in a mess. He's been so busy doing research that he hasn't bothered to clean out his room for months. Now he has decided to sort out all the items in his room and keep only the essential ones. He knows the usefulness of each of the 'N' items that he has, and wants to keep only the 'K' most useful items. Bala is also very forgetful, so he wants a procedure that doesn't require him to remember too many things at once.


Input
The first line of input contains 'T', the number of test cases (1 ≤ T ≤ 100). This is followed by T test cases. Each test case begins with a blank line followed by one line containing two numbers 'N' (number of items), and 'K' (number of essential items) (1 ≤ K ≤ N ≤ 100000000). This is followed by one line containing the usefulness of all the 'N' items, seperated by spaces.



Output
The output should consist of 'T' lines corresponding to the 'T' test cases. Each line should contain one number, which is the sum of the usefulness of the 'K' most useful items.


Example

Input:
2

5 2
10 23 47 3 17

10 4
87 45 99 27 58 100 38 50 31 62


Output:
70
348

Solution (in PYTHON):

Solution:
import sys
    
t=int(sys.stdin.readline())
    
for __ in range(0,t):

    s=sys.stdin.readline().split()
    s=sys.stdin.readline().split()
    
    n=int(s[0])
    k=int(s[1])
    #print(n),
    #print(k)
    a=[0]*n
    s=sys.stdin.readline().split()
    #s.reverse()

    for u in range(0,n):
        a[u]=int(s[u])
    
    #print(a[0])
    sum=0
    a.sort()
    a.reverse()
    #print(a[0]),
    #print(a[1])
        
    for j in range (0,k):
        sum=sum+a[j]
    
    print sum