文章
6
粉丝
105
获赞
2
访问
3.8k
#include<iostream>
#include<algorithm>
#include<cstring>
using namespace std;
struct Student {
string name;
int yu;//语文
int shu;//数学
int wai;//英语
int id;//输入的先后顺序标志
double zhong;//总分
}stu[1000];
bool compare1(Student a, Student b) {
if (a.zhong == b.zhong && a.yu == b.yu && a.shu == b.shu && a.wai == b.wai)return a.id < b.id;
if (a.zhong == b.zhong && a.yu == b.yu && a.shu == b.shu)return a.wai > b.wai;
if (a.zhong == b.zhong && a.yu == b.yu)return a.shu > b.shu;
if (a.zhong == b.zhong)return a.yu > b.yu;
return a.zhong > b.zhong;
}
int main() {
int n;
while (cin >> n) {
for (int i = 0; i <...
登录后发布评论
暂无评论,来抢沙发