#include int main(){ int i,j,a; int size; scanf("%d",&size); while(size--){ int N, K; double P[40]; double opt_prob, tmp, add; int res[40], ind[40], now[40]; scanf("%d%d",&N,&K); for(i=0; i P[j]){ tmp = P[j-1]; P[j-1] = P[j]; P[j] = tmp; a = ind[j-1]; ind[j-1] = ind[j]; ind[j] = a; } opt_prob = -1; for(a=0; a<=K; a++){ for(i=0; i