正文
增加 3 行删除 3 行
17 行未改动18192021222324252643 行未改动70717273747576777810 行未改动89909192939495969740 行未改动17 行未改动end = false;}} tr[N];int tot;int fa[N];vector<int> g[N];int sz[N], hson[N], top[N], dep[N];void init() {tot = 0;43 行未改动}}}dep[0] = 0;stack<pair<int, int>> st;st.push({0, 0});while (!st.empty()) {auto [u, state] = st.top(); st.pop();if (state == 0) {10 行未改动if (hson[u] == -1 || sz[v] > sz[hson[u]]) hson[u] = v;}}}stack<pair<int, int>> st2;st2.push({0, 0});while (!st2.empty()) {auto [u, tp] = st2.top(); st2.pop();top[u] = tp;40 行未改动17 行未改动18192021222324252643 行未改动70717273747576777810 行未改动89909192939495969740 行未改动17 行未改动end = false;}} tr[N];int tot;int fa[N];vector<int> g[N];int sz[N], hson[N], top[N], dep[N];void init() {tot = 0;43 行未改动}}}dep[0] = 0;stack<pair<int, int>> st;st.push({0, 0});while (!st.empty()) {auto [u, state] = st.top(); st.pop();if (state == 0) {10 行未改动if (hson[u] == -1 || sz[v] > sz[hson[u]]) hson[u] = v;}}}stack<pair<int, int>> st2;st2.push({0, 0});while (!st2.empty()) {auto [u, tp] = st2.top(); st2.pop();top[u] = tp;40 行未改动