func_code_string: #include <bits/stdc++.h>   using namespace std;   struct pi {     bool dir;     int node;     int edge;   };   const int mxn = 200005;   int n;   vector<pi> graph[mxn];   int dp1[mxn];   vector<int> vv;   int ans = 1000000000;   void dfs1(int v, int p) {     for (int i = 0; i < graph[v].size(); i++) {       pi u = graph[v][i];       if (u.node == p) continue;       dfs1(u.node, v);       dp1[v] += dp1[u.node];       if (u.dir) dp1[v]++;     }   }   void dfs2(int v, int p, int l) {     int temp = l + dp1[v];     if (ans == (n - 1) - temp)       vv.push_back(v);     else if (ans > (n - 1) - temp) {       vv.clear();       vv.push_back(v);       ans = (n - 1) - temp;     }     for (int i = 0; i < graph[v].size(); i++) {       pi u = graph[v][i];       if (u.node == p) continue;       int something = temp - dp1[u.node];       if (u.dir)         something--;       else         something++;       dfs2(u.node, v, something);     }   }   int main() {     scanf( %d , &n);     for (int i = 1; i < n; i++) {       int x, y;       scanf( %d%d , &x, &y);       pi temp;       temp.dir = 1;       temp.node = y;       temp.edge = i;       graph[x].push_back(temp);       temp.dir = 0;       temp.node = x;       graph[y].push_back(temp);     }     dfs1(1, 1);     dfs2(1, 1, 0);     printf( %d n , ans);     sort(vv.begin(), vv.end());     printf( %d , vv[0]);     for (int i = 1; i < vv.size(); i++) printf(  %d , vv[i]);     printf(  n );     return 0;   }   