AC题解
2023-08-12 16:31:53
发布于:浙江
2阅读
0回复
0点赞
#include <iostream>
#include <string>
using namespace std;
string nameres,name;
int qmpj,pycj,lw,mx = 0,res = 0;
char gb,xb;
int n;
int main(){
cin >> n;
for(int i = 1;i <= n;i++){
cin >> name >> qmpj >> pycj >> gb >> xb >> lw;
int money = 0;
if(qmpj > 80 && lw >= 1) money+=8000;
if(qmpj > 85 && pycj > 80) money+=4000;
if(qmpj > 90) money+=2000;
if(qmpj > 85 && xb == 'Y') money+=1000;
if(pycj > 80 && gb == 'Y') money += 850;
if(money > mx){
mx = money;
nameres = name;
}
res += money;
}
cout << nameres << endl << mx << endl << res;
return 0;
}
这里空空如也
有帮助,赞一个