#include using namespace std; #define int long long signed main(){ int T; cin>>T; while(T--){ int N,M; cin>>N>>M; vector A(N); for(int i=0;i>A[i]; if(N <= 2*M){ vector B = {}; for(int x:A) B.emplace_back(x); while(B.size() != 1){ vector C = {}; for(int i=1;i C(M); for(int i=0;i D = {}; for(int x:C) D.emplace_back(x); for(int i=2;i<=M;i++){ vector E = {}; for(int j=1;j