P16757 [HackerEarth] Garg is desperate for CGPA. His new teacher PK gives an assignment everyday.The marks assigned for the assignment on ith day is given as a[i]. Since PK likes garg he will award full mark
普及
题目描述

Garg is desperate for CGPA. His new teacher PK gives an assignment everyday.The marks assigned for the assignment on ith day is given as a[i]. Since PK likes garg he will award full marks if garg assigns the assignment.Since garg wants highest marks he tries to submit as many assignments as possible.Garg also has a girlfriend. He cant meet his girlfriend if he is busy writing the assignment on the ith day.
If he wont meet his girlfriend atleast once in k+1 consecutive days she will leave him. Help garg to save his girlfriend and to attain maximum marks possible.

Input:
First line contains a single integer T denoting number of test cases.
In each test case first line contains two integers n and k,seperated by a space which represent number of days and k as mentioned above respectively.
Then n lines follow.In each line there is a single integer.The integer on ith line represents a[i].

Output:
For each test case print the required answer in a seperate line.

Constrains:

1 ≤ T ≤ 15
1 ≤ n ≤ 100000
1 ≤ k ≤ n
1 ≤ a[i] ≤ 500

Problem Setter:-
Teja Vojjala
Problem Tester:-
Shivam Garg

SAMPLE INPUT
1
3 2
1
2
3

SAMPLE OUTPUT
5

Explanation

In first test case garg can meet his girlfriend on 1st day and do his assignments on 2nd and 3rd day.

输入格式

见题面

输出格式

见题面

样例输入
1 100 10 22 45 8 2 4 35 48 33 35 14 21 48 47 35 2 9 45 8 25 21 16 44 10 39 41 12 12 27 33 11 10 42 17 48 32 29 43 19 45 12 3 14 29 12 46 40 4 31 31 11 24 8 17 3 15 26 7 18 39 48 19 19 33 33 19 16 31 46 23 43 27 33 9 43 21 47 7 20 5 7 1 15 17 48 22 12 50 38 23 18 49 39 23 15 17 21 14 5 7 7
样例输出
2337