正文
增加 13 行删除 13 行
90 行未改动9192939495969798997 行未改动10710810911011111211311411554 行未改动17017117217317417517617717814 行未改动1931941951961971981992002018 行未改动21021121221321421521621721884 行未改动3033043053063073083093103117 行未改动31932032132232332432532632785 行未改动4134144154164174184194204218 行未改动430431432433434435436437438120 行未改动全部展开55956056156256356456556656756856957057157216 行未改动5895905915925935945955965978 行未改动60660760860961061161290 行未改动signed main(){ios::sync_with_stdio(0);cin.tie(0);cin >> n >> m >> s;int x,y;for(int i = 1; i < n; i++){7 行未改动cin >> x >> y;cout << lca(x,y) << endl;}return 0;}```::::---54 行未改动}inline void dfs2(int x,int t){top[x] = t,id[x] = ++cnt;if(!wson[x]) return;dfs2(wson[x],t);14 行未改动signed main(){ios::sync_with_stdio(0);cin.tie(0);cin >> n >> m >> s;int x,y;for(int i = 1; i < n; i++){8 行未改动cin >> x >> y;cout << lca(x,y) << endl;}return 0;}```::::---84 行未改动signed main(){ios::sync_with_stdio(0);cin.tie(0);cin >> n >> m >> s;int x,y;for(int i = 1; i < n; i++){7 行未改动cin >> x >> y;cout << lca(x,y) << endl;}return 0;}```::::---85 行未改动signed main(){ios::sync_with_stdio(0);cin.tie(0);cin >> n >> m >> s;int x,y;for(int i = 1; i < n; i++){8 行未改动if(x == y) cout << x << endl;else cout << lca(x,y) << endl;}return 0;}```::::---120 行未改动全部展开inline void dfs(int x,int father){dep[x] = dep[father] + 1;fa[x] = father;int p = lb[father],q = lb[p];if(dep[father] - dep[p] != dep[p] - dep[q])lb[x] = father;else lb[x] = q;for(int i = pre[x]; i; i=e[i].ne){int y = e[i].to;if(y != father) dfs(y,x);}16 行未改动signed main(){ios::sync_with_stdio(0);cin.tie(0);cin >> n >> m >> s;int x,y;for(int i = 1; i < n; i++){8 行未改动if(x == y) cout << x << endl;else cout << lca(x,y) << endl;}return 0;}```::::90 行未改动9192939495969798997 行未改动10710810911011111211311411554 行未改动17017117217317417517617717814 行未改动1931941951961971981992002018 行未改动21021121221321421521621721884 行未改动3033043053063073083093103117 行未改动31932032132232332432532632785 行未改动4134144154164174184194204218 行未改动430431432433434435436437438120 行未改动全部展开55956056156256356456556656756856957057157216 行未改动5895905915925935945955965978 行未改动60660760860961061161290 行未改动signed main(){ios::sync_with_stdio(0);cin.tie(0);cin >> n >> m >> s;int x,y;for(int i = 1; i < n; i++){7 行未改动cin >> x >> y;cout << lca(x,y) << endl;}return 0;}```::::---54 行未改动}inline void dfs2(int x,int t){top[x] = t,id[x] = ++cnt;if(!wson[x]) return;dfs2(wson[x],t);14 行未改动signed main(){ios::sync_with_stdio(0);cin.tie(0);cin >> n >> m >> s;int x,y;for(int i = 1; i < n; i++){8 行未改动cin >> x >> y;cout << lca(x,y) << endl;}return 0;}```::::---84 行未改动signed main(){ios::sync_with_stdio(0);cin.tie(0);cin >> n >> m >> s;int x,y;for(int i = 1; i < n; i++){7 行未改动cin >> x >> y;cout << lca(x,y) << endl;}return 0;}```::::---85 行未改动signed main(){ios::sync_with_stdio(0);cin.tie(0);cin >> n >> m >> s;int x,y;for(int i = 1; i < n; i++){8 行未改动if(x == y) cout << x << endl;else cout << lca(x,y) << endl;}return 0;}```::::---120 行未改动全部展开inline void dfs(int x,int father){dep[x] = dep[father] + 1;fa[x] = father;int p = lb[father],q = lb[p];if(dep[father] - dep[p] != dep[p] - dep[q])lb[x] = father;else lb[x] = q;for(int i = pre[x]; i; i=e[i].ne){int y = e[i].to;if(y != father) dfs(y,x);}16 行未改动signed main(){ios::sync_with_stdio(0);cin.tie(0);cin >> n >> m >> s;int x,y;for(int i = 1; i < n; i++){8 行未改动if(x == y) cout << x << endl;else cout << lca(x,y) << endl;}return 0;}```::::