WA力,求助!
查看原帖
WA力,求助!
1034698
jzy_CSPJ_AK楼主2024/1/8 20:26
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,x,y,sum=0,max=0,t=0,u,i;
    char a,b;
    string name,maxn;
    cin>>n;
    for(i=1;i<=n;i++)
    {
        cin>>name>>x>>y>>a>>b>>u;
        if(x>80 && u>0)sum+=8000;
        if(x>85 && y>80)sum+=4000;
        if(x>90)sum+=2000;
        if(x>85 && b=='Y')sum+=1000;
        if(x>80 && a=='Y')sum+=850;
        t+=sum;
        if(sum>max)maxn=name,max=sum;
        sum=0;
    }
    cout<<maxn<<endl<<max<<endl<<t;
    return 0;
}

help,只有30分!

2024/1/8 20:26
加载中...