func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 2e5 + 10, INF = 1e9;   vector<int> g[N], r[N], out;   int cnt[N], ans = INF, sum = 0;   int dfs(int v, int par) {     for (int i = 0; i < g[v].size(); i++)       if (g[v][i] != par) cnt[v] += dfs(g[v][i], v);     for (int i = 0; i < r[v].size(); i++)       if (r[v][i] != par) cnt[v] += 1 + dfs(r[v][i], v);     return cnt[v];   }   void dfs2(int v, int par, int a, int b) {     for (int i = 0; i < g[v].size(); i++)       if (g[v][i] != par) dfs2(g[v][i], v, a + 1, b);     for (int i = 0; i < r[v].size(); i++)       if (r[v][i] != par) dfs2(r[v][i], v, a, b + 1);     int cur = sum - b + a;     if (cur < ans) {       ans = cur;       out.clear();       out.push_back(v + 1);     } else if (cur == ans)       out.push_back(v + 1);   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(0);     int n;     cin >> n;     for (int i = 0; i < n - 1; i++) {       int a, b;       cin >> a >> b;       a--;       b--;       g[a].push_back(b);       r[b].push_back(a);     }     dfs(0, -1);     sum = cnt[0];     dfs2(0, -1, 0, 0);     cout << ans <<   n ;     sort(out.begin(), out.end());     for (int i = 0; i < out.size(); i++)       cout << out[i] <<    n [i == out.size() - 1];     return 0;   }   