###格式
<返回类型>operator<运算符号>(参数){
<函数内容>
}
#####(常用在优先队列里)
Example1
struct purple{
int id;
int age;
bool operator<(const purple &a)const{
if(a.age==age) return a.id<id;
return a.age<age;
}
};
//年龄(age)从小到大排,当年龄相同时编号(id)从小到大排Example2
struct Edge{
int id,d;
bool operator<(const Edge &k)const{
return k.d<d;
}
};
[return k.d<d:最后排序结果中为降序序列(d1<d2<d3<......<di)]