- 谁拿了最多奖学金
- 2014-12-29 20:04:39 @
#include<iostream>
#include<string>
#include<cstdio>
using namespace std;
struct date{
string name[1000];
int a[1000];
int b[1000];
char c[1000];
char d[1000];
int e[1000];
}A;
int main()
{
int n;
int i=0;
scanf("%d",&n);
int temp=n;
int sum[n];
int money=0;
while(n--)
{
sum[i]=0;
cin>>A.name[i]>>A.a[i]>>A.b[i]>>A.c[i]>>A.d[i]>>A.e[i];
if(A.a[i]>80&&A.e[i]>0)sum[i]+=8000;
if(A.a[i]>85&&A.b[i]>80)sum[i]+=4000;
if(A.a[i]>90)sum[i]+=2000;
if(A.a[i]>85&&A.d[i]=='Y')sum[i]+=1000;
if(A.a[i]>80&&A.c[i]=='Y')sum[i]+=850;
money+=sum[i];
i++;
}
int t=0;
int max=sum[0];
for(i=0;i<temp;i++){
if(sum[i]>max){
max=sum[i];
t=i;
}
}
cout<<A.name[t]<<endl;
cout<<sum[t]<<endl;
cout<<money;
return 0;
}