#include #include #include #include #include #include #include #include #include #include //GL&HF #include typedef long long ll; const int inf=0x3f3f3f3f; using namespace std; ll n,k; ll a[100010]; int main() { //freopen("input.txt","r",stdin); //freopen("output.txt","w",stdout); int t; scanf("%d",&t); while(t--) { scanf("%I64d%I64d",&n,&k); n--; for(int i=0;i