摘要: st+dfs序求lca ll dfn[N][2], id[N << 1], s, n, m, tot; vector<ll> g[N]; void dfs(ll u, ll fa) { dfn[u][0] = dfn[u][1] = ++tot; id[tot] = u; for (auto to 阅读全文
posted @ 2022-01-07 14:58 DeaL57 阅读(43) 评论(0) 推荐(0) 编辑