int merge(int x,int y){ if(!x||!y)return x+y; if(pri[x]<pri[y]){ r[x]=merge(r[x],y); pushup(x); } else{ l[y]=merge(x,l[y]); pushup(y); } }
摘自 CSP-J T2