如果你写树剖,那么其中一行不能写成if(dep[x]<dep[y]),要写成if(dep[top[x]]<dep[top[y]])
if(dep[x]<dep[y])
if(dep[top[x]]<dep[top[y]])
(害得我调了半天,我是唐氏儿)