/ @@18khV /

记录详情

Accepted


  
# 状态 耗时 内存占用
#1 Accepted 2ms 408.0 KiB
#2 Accepted 1ms 340.0 KiB
#3 Accepted 1ms 416.0 KiB
#4 Accepted 1ms 376.0 KiB
#5 Accepted 1ms 340.0 KiB
#6 Accepted 1ms 336.0 KiB
#7 Accepted 2ms 360.0 KiB
#8 Accepted 2ms 360.0 KiB
#9 Accepted 1ms 340.0 KiB
#10 Accepted 1ms 376.0 KiB

代码

#include <bits/stdc++.h>
using namespace std;
int main()
{
    string name[101];
    int qimo[101],banji[101];
    char xuesheng[101],xibu[101];
    int lunwen[101];
    int n,ans=0;
    int money;
    int max1=-1;
    string maxstudent;
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        money=0;
        cin>>name[i]>>qimo[i]>>banji[i]>>xuesheng[i]>>xibu[i]>>lunwen[i];
        if(qimo[i]>80 && lunwen[i]>=1) money+=8000;
        if(qimo[i]>85 && banji[i]>80) money+=4000;
        if(qimo[i]>90) money+=2000;
        if(qimo[i]>85 && xibu[i]=='Y') money+=1000;
        if(banji[i]>80 && xuesheng[i]=='Y') money+=850;
        ans+=money;
        if(money>max1)
        {
            max1=money;
            maxstudent=name[i];
        }
    }
    cout<<maxstudent<<endl<<max1<<endl<<ans;
	return 0;
}

信息

递交者
类型
递交
题目
P1000 谁拿了最多奖学金
题目数据
下载
语言
C++
递交时间
2020-07-23 17:32:53
评测时间
2023-09-05 13:30:23
评测机
分数
100
总耗时
19ms
峰值内存
416.0 KiB