- 谁拿了最多奖学金
- 2016-07-24 15:54:08 @
#include<cstdio>
using namespace std;
struct xs
{
char xm[23];
int qm,bj;
bool gb,xb;
int lw;
int jxj;
};
xs a[103];
int n,s,S;
char x,y;
int main()
{
scanf("%d",&n);
s=1;S=0;
for(int i=1;i<=n;++i)
{scanf("%s %d %d %c %c %d",&a[i].xm,&a[i].qm,&a[i].bj,&x,&y,&a[i].lw);
a[i].gb=a[i].xb=false;
if(x=='Y')
a[i].gb=true;
if(y=='Y')
a[i].xb=true;
a[i].jxj=0;
if(a[i].qm>80&&a[i].lw>=1)
a[i].jxj+=8000;
if(a[i].qm>85&&a[i].bj>80)
a[i].jxj+=4000;
if(a[i].qm>90)
a[i].jxj+=2000;
if(a[i].qm>85&&a[i].xb)
a[i].jxj+=1000;
if(a[i].qm>80&&a[i].gb)
a[i].jxj+=850;
if(a[i].jxj>a[s].jxj)
s=i;
S+=a[i].jxj;
//printf("%s %d %d %d %d %d %d\n",a[i].xm,a[i].qm,a[i].bj,a[i].gb,a[i].xb,a[i].lw,a[i].jxj);
}
printf("%s\n%d\n%d",a[s].xm,a[s].jxj,S);
return 0;
}