这个是对的
int h=dep[a]-dep[b]; int i=0; while(h>0) { if(h&1) a=f[a][i]; i++; h>>=1; }
这个是错的
for(int i=M-1;i>=0;i--) if(dep[f[a][i]]>=dep[b]) a=f[a][i];