文章
13
粉丝
120
获赞
1
访问
6.4k
#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...
登录后发布评论
暂无评论,来抢沙发