|
- #include <iostream>
- #include <cstdio>
- #include <cstdlib>
- #include <cmath>
- #include <cstring>
- #include <algorithm>
- using namespace std;
- int main(){
- int n,b,c,f,i,max=0,maxR=0,money=0,moneymax=0,moneyall=0,maxi=0;
- char d,e,a[120][25];
- scanf("%d",&n);
- for(i=1;i<=n;i++)
- {
- money=0;
- scanf("%s %d %d %c %c %d",a[i],&b,&c,&d,&e,&f);
- if(b>80&&f>=1)
- money=money+8000;
- if(b>85&&c>80)
- money=money+4000;
- if(b>90)
- money=money+2000;
- if(e=='Y'&&b>85)
- money=money+1000;
- if(d=='Y'&&c>80)
- money=money+850;
- moneyall=moneyall+money;
- if(money>moneymax)
- {
- moneymax=money;
- maxi=i;
- }
- }
- puts(a[maxi]);
- printf("%d\n%d",moneymax,moneyall);
- return 0;
- }
复制代码 |
|