// input code here
#include<bits/stdc++.h>
using namespace std;
struct Student
{
    char c,d,Name[100];
    int a,b,e,f=0;
}Students[101],Best;
int main()
{
    int n,Temp=0;
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        cin>>Students[i].Name;
        cin>>Students[i].a;
        cin>>Students[i].b;
        cin>>Students[i].c;
        cin>>Students[i].d;
        cin>>Students[i].e;
        if((Students[i].a>80)&&(Students[i].e)) Students[i].f+=8000;
        if((Students[i].a>85)&&(Students[i].b>80)) Students[i].f+=4000;
        if(Students[i].a>90) Students[i].f+=2000;
        if((Students[i].a>85)&&(Students[i].d=='Y')) Students[i].f+=1000;
        if((Students[i].b>80)&&(Students[i].c=='Y')) Students[i].f+=850;
    }
    Best.f=0;
    for(int i=1;i<=n;i++)
    {
        if(Students[i].f>Best.f)
        {
            strcpy(Best.Name,Students[i].Name);
            Best.f=Students[i].f;
        }
        Temp+=Students[i].f;
    }

    cout<<Best.Name<<endl<<Best.f<<endl<<Temp<<endl;
}

1 条评论

  • 1

信息

ID
1001
难度
5
分类
模拟 点击显示
标签
递交数
39260
已通过
12791
通过率
33%
被复制
129
上传者