std::vector<int> tree[maxn]; int fa[maxn]; void dfs(int u,int father) { int len = tree[u].size(); for (int i = 0;i < len;i++) { int v = tree[u][i]; if (v != father) dfs(v,fa[v] = u); } }
std::vector<int> tree[maxn]; int fa[maxn]; void dfs(int u,int father) { int len = tree[u].size(); for (int i = 0;i < len;i++) { int v = tree[u][i]; if (v != father) dfs(v,fa[v] = u); } }