#include #include #include #include using namespace std; struct person{ char name[30]; char sex[10]; double r1,r2; }; person p[110]; person f[110]; person ans[110]; bool cmp(person a,person b){ return (a.r1*0.3+a.r2*0.7) > (b.r1*0.3+b.r2*0.7); } int main() { int t; int n,m; scanf("%d",&t); while(t--){ scanf("%d%d",&n,&m); double max1,max2; max1 = max2 = 0; for(int i = 0;i < n;i++){ scanf("%s%s%lf%lf",p[i].name,p[i].sex,&p[i].r1,&p[i].r2); if(p[i].r1 > max1) max1 = p[i].r1; if(p[i].r2 > max2) max2 = p[i].r2; } double rate1 = (double)300/max1; double rate2 = (double)300/max2; // cout<