#include #define ll long long #define eps 1e-9 #define PI 2 * acos (0.0) using namespace std; const int mod=1000000000 + 7; ll dp[1005][1005]; int cnt[1005]; int ar[1005]; int main() { int a,b,c,d,e,x,y,z,n,t,k; scanf("%d",&t); while(t--) { scanf("%d %d",&n,&k); for(a=0;a<=1000;a++) { cnt[a]=0; for(b=0;b<=1000;b++) dp[a][b]=0; } for(a=0;av; v.clear(); for(a=1;a<=n;a++) v.push_back(D[a]); cout<