显示代码纯文本
#include<string>
#include<iostream>
#include<cstdio>
using namespace std;
string a[110],mmp;
int b[110],c[110],f[110],k[110]={0};
char d[110],e[110];
//a是姓名,b是期末平均,c是班级评议,d是干部,e是西部,f是论文
//那么k就是得的钱啦。。。。。。
int main(){
freopen("scholar.in","r",stdin);
freopen("scholar.out","w",stdout);
int n,op=0;
long long int u=0;
cin>>n;
for(int i=1;i<=n;i++){
cin>>a[i]>>b[i]>>c[i]>>d[i]>>e[i]>>f[i];
if(b[i]>80&&f[i]>0)k[i]+=8000;
if(b[i]>85&&c[i]>80)k[i]+=4000;
if(b[i]>90)k[i]+=2000;
if(b[i]>85&&e[i]=='Y')k[i]+=1000;
if(c[i]>80&&d[i]=='Y')k[i]+=850;
u+=k[i];
if(k[i]>op){
op=k[i];
mmp=a[i];
}
}
cout<<mmp<<endl<<op<<endl<<u;
return 0;
}