结构体内重载
struct exam{
int a, b , c;
bool operator < (const exam &u)const{
if(a == u.a && b == u.b) return c > u.c;
if(a == u.a) return b > u.b;
else return a > u.a;
}
}
函数运算符重载
struct exam{
int a, b , c;
}
bool cmp(const exam &u, const exam &v){
if(u.a == v.a && u.b == v.b) return u.c > v.c;
if(u.a == v.a) return u.b > v.b;
else return u.a > v.a;
}