正文
增加 3 行删除 3 行
47 行未改动4849505152535455565758596028 行未改动47 行未改动### 使用树链剖分求 LCA 的过程```cppint lca(int x,int y){while(hd[x]!=hd[y]){if(dep[hd[x]]>dep[hd[y]]) swap(x,y);y=hd[y];y=fa[y];}if(dep[y]<dep[x]) return y;else return x;28 行未改动47 行未改动4849505152535455565758596028 行未改动47 行未改动### 使用树链剖分求 LCA 的过程```cppint lca(int x,int y){while(hd[x]!=hd[y]){if(dep[hd[x]]>dep[hd[y]]) swap(x,y);y=hd[y];y=fa[y];}if(dep[y]<dep[x]) return y;else return x;28 行未改动