#include <iostream>
using namespace std;
#define N 500
struct student {
char id[13];
char name[11];
char major[11];
int English;
int spec1;
int spec2;
int total;
} stu[N];
int main() {
int i, n, m, t;
cin >> n >> m >> t;
for (i = 0; i < n; i++) {
cin >> stu[i].id >> stu[i].name >> stu[i].major >> stu[i].English >> stu[i].spec1 >>
stu[i].spec2;
}
for (i = 0; i < n; i++) {
stu[i].total = stu[i].English + stu[i].spec1 + stu[i].spec2;
}
int f = 0;
for (i = 0; i < n; i++) {
if (stu[i].English >= m && stu[i].spec1 >= m && stu[i].spec2 >= m && stu[i].total >= t) {
cout << stu[i].id << "-" << stu[i].name << "-" << stu[i].major << "-" << stu[i].English << "-" << stu[i].spec1 <<
"-" << stu[i].spec2 << "-" << stu[i].total << endl;
}
f = 1;
}
if (f == 0)
cout << "Ruo" << endl;
return 0;
}
部分学生成绩管理系统(录取)
最新推荐文章于 2024-09-16 17:46:36 发布