bool cmp(node x,node y){return x.val<y.val;}
要写成
bool cmp(node x,node y) { return (x.val==y.val)?x.num<y.num:x.val<y.val; }