In Programmers Army Land, people have started preparation as sports day is scheduled next week.
You are given a task to form 1 team of $k$ consecutive players, from a list of sports player whose powers are given to you.
You want your team to win this championship, so you have to chose your $k$ team players optimally i.e. there must not be any other $k$ consecutive team players who have their total power greater than your team members total power.
-----Input:-----
- The first line of the input contains a single integer $T$. $T$ denoting the number of test cases. The description of $T$ test cases is as follows.
- The next line of the input contains 2 space separated integers $N$ and $K$. $N$ denotes the total number of players and $K$ denotes the number of players allowed in a team.
- The next line of the input contains $N$ space-separated integers $A1, A2, A3...An$ where $ith$ number denotes power of $ith$ player.
Note: power of players can also be negative
-----Output:-----
- For each test-case print the total power that your selected team have(each test case output must be printed on a new line).
-----Constraints:-----
- $1 \leq T \leq 10^3$
- $1 \leq N,K \leq 10^5$
- $-10^7 \leq A1, A2, A3...An \leq 10^7$
-----Sample Input:-----
1
5 3
1 2 3 4 5
-----Sample Output:-----
12
def maxSum(arr, n, k): 
    res = 0
    for i in range(k): 
        res += arr[i] 
    curr_sum = res 
    for i in range(k, n): 
        curr_sum += arr[i] - arr[i-k] 
        res = max(res, curr_sum) 
    return res 
for i in range(int(input())):
    n,k=map(int,input().split())
    arr=list(map(int,input().split()))
    print(maxSum(arr,n,k))
def maxSum(arr, n, k): 
    res = 0
    for i in range(k): 
        res += arr[i] 
    curr_sum = res 
    for i in range(k, n): 
        curr_sum += arr[i] - arr[i-k] 
        res = max(res, curr_sum) 
    return res 
for i in range(int(input())):
    n,k=map(int,input().split())
    arr=list(map(int,input().split()))
    print(maxSum(arr,n,k))