rt. 到根的距离 disdisdis 最大可到 101410^{14}1014,如果你写了离散化函数,那千万不要:
int lsh(int x){return lower_bound(tmp+1,tmp+m+1,x)-tmp;}
应该为:
int lsh(ll x){return lower_bound(tmp+1,tmp+m+1,x)-tmp;}