#include #include #include #include using namespace std; #define N 32 #define cls(a) memset(a, 0, sizeof(a)) #define cls1(a,i,j) memset(a+i, 1, (j-i+1)*sizeof(bool)) #define cls0(a, i) memset(a, 0, i*sizeof(bool)) struct computer{ bool able[1005]; int pcent; }cpt[N]; bool isSver[N]; int Sver[N]; int Clnt[N]; int rate[N][N]; int main() { int d, n, t, k, s, i, j, l, st, ed, m, c; scanf("%d", &d); while(d--) { cls(isSver); cls(Clnt); cls(Sver); cls(cpt); cls(rate); scanf("%d%d", &n, &t); scanf("%d%d", &s, &k); for(i=0; i t) continue; if(ed > t) ed = t; for(l=st; l= k) { isSver[Clnt[j]] = 1; Sver[s++] = Clnt[j]; for(c--, l=j; l=k ? 100 : (cpt[i].pcent*100/k)); } } return 0; }