孙诗皓 • 7个月前
#include <iostream>
#include <algorithm>
using namespace std;
struct Stu{
int no;
int chinese;
int math;
int english;
int total;
};
bool cmp(Stu x,Stu y)
{
if(x.total<y.total)
return true;
else if(x.total==y.total)
{
if(x.chinese<y.chinese)
return true;
else if(x.chinese==y.chinese)
return x.no>y.no;
}
return false;
}
评论: