//用重载定义结构体的排序方式 struct node { int a, b; bool operator < (const node &t) const { if (a != t.a) return a < t.a; else return b < t.b; } };