The first line of the input contains a single integer �(1≤�≤20)T(1≤T≤20)indicating the number of test cases.
In each test case:
The first line contains two integers�,�.(2≤�≤20000,2≤�≤2000,�≤�)n,m.(2≤n≤20000,2≤m≤2000,m≤n)
The second line contains n intergers �1,�2,...,��(0≤��≤20000)a1,a2,...,an(0≤ai≤20000)
It's guarenteed that in all test cases, ∑�≤50000∑n≤50000
For each test case:
You need to print a integers represents the smallest cost.
1
7 3
1 5 7 2 1 4 8
13