文章

13

粉丝

48

获赞

0

访问

1.6k

头像
不简洁
P1088
发布于2024年3月26日 12:00
阅读数 88

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;
struct Student
{
    string name;
    int score;
    int class_score;
    string is_leader;
    string is_west;
    int paper_count;
    int reward;
};

int judge(Student stu)
{
    int reward = 0;
    if (stu.score > 80 && stu.paper_count >= 1)
        reward += 8000;
    if (stu.score > 85 && stu.class_score > 80)
        reward += 4000;
    if (stu.score > 90)
        reward += 2000;
    if (stu.score > 85 && stu.is_west == "Y")
        reward += 1000;
    if (stu.class_score > 80 && stu.is_leader == "Y")
        reward += 850;
    return reward;
}

int main()
{
    int n;
    cin >> n;
    vector<Student> students;
    int max = 0, maxi = 0, total = 0;
    for (int i = 0; i < n; i++)
    {
        Student stu;
        cin >> stu.name >> s...
登录查看完整内容


登录后发布评论

暂无评论,来抢沙发