BB 众所周知,LCA有N种方法。一种种慢慢学。。。 方法 1. 倍增求法 2. 待续... Problem List POJ 1986 //POJ 1986 lca模板 #include<bits/stdc++.h> using namespace std; const int maxn=4e4+5; struct Edge{ int to; int len; }; vector<Edge> G[maxn]; int fa[maxn][21],dep[maxn],dist[maxn]; void dfs(int u) { for(int i...