#include <stdio.h>
#include <string.h>
int main()
{
int test,n,P,V,days,vmax;
double avg,avgmin;
char brand[102],ansBrand[102];
scanf("%d",&test);
while(test--)
{
scanf("%d",&n);
vmax=0;
avgmin=100000.0;
while(n--)
{
scanf("%s %d %d",brand,&P,&V);
if(V<200)
continue;
if(V>=1000)
avg=1.0*P/5;
else
{
days=V/200;
avg=1.0*P/days;
}
if(avg<avgmin||avg==avgmin&&V>vmax)
{
avgmin=avg;
vmax=V;
strcpy(ansBrand,brand);
}
}
if(avgmin==100000.0)
continue;
else
printf("%s\n",ansBrand);
}
return 0;
}
hdu1070 Milk
最新推荐文章于 2013-09-02 11:41:18 发布