- 问答
https://xazxoj.cn/p/664?tid=6555f57dda2b09a844250cbb
- 2023-11-25 15:39:15 @
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,maxs=0,sum=0,s,ex,cl,st;
char name[20],maxname[20],g,x;
cin >> n;
while (n--)
{
s=0;
for (int i=0; i<20; i++)
name[i]=0;
cin >> name >> ex >> cl >> g >> x >> st;
if (ex>80&&st>0) s=s+8000;
if (ex>85&&cl>80) s=s+4000;
if (ex>90) s=s+2000;
if (ex>85&&x=='Y') s=s+1000;
if (cl>80&&g=='Y') s=s+850;
sum=sum+s;
if (s>maxs)
{
maxs=s;
for (int i=0; i<20; i++)
maxname[i]=0;
strcpy (maxname,name);
}
}
cout << maxname << endl;
cout << maxs << endl;
cout << sum << endl;
return 0;
}
//一直爆0,求帮助
0 comments
No comments so far...