The first line contains an positive integer T(1≤T≤10), represents there are T test cases.For each test case:The first line contains two positive integers n,k(1≤n≤105,1≤k<n),the length of the sequence ,the least steps you need to move.The second line contains n integers a1,a2…an(1≤ai≤108) - the sequence.
For each test case, you should output the max F(n).
In the first example, you can move the fifth number 4 for 3 steps and make the sequence become [4,1,1,3,5], then the beautiful value is 4×1+1×2+1×3+3×4+5×5=46.
You can also move the fifth number to make it become [1,5,1,3,4], the beautiful value is also 46.
In the second example, you can move the fifth number 5 for 2 steps and make the sequence become [1,1,5,3,4]
In the second example, you can move the second number 1 for 1 steps and then the sequence is still [1,1,3,4,5]
scanf is commended。