solution
- 输出合格的学生信息,其中所谓合格需要同时满足
- 在线编程成绩>=200
- 总评成绩>=60
总评计算方法为- 当期中成绩>期末成绩时,总评=期中成绩0.4+期末成绩0.6
- 否则,总评=期末成绩
- 通过map建立学号和学生信息间的关联,否则直接顺序查找的话测试点3超时
#include<iostream>
#include<string>
#include<map>
#include<algorithm>
using namespace std;
const int maxn = 1e4 + 10;
struct stu{
string id;
double gp, gm = -1, gf = -1, f = 0