func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 3e5 + 100;   long long n, x, y;   int a[maxn];   vector<long long> v[maxn];   int vis[maxn];   int flag;   void dfs(int u) {     int i, j;     vis[u] = 1;     if (u == y) {       flag = 1;       return;     }     for (i = 0; i < v[u].size(); i++) {       int k = v[u][i];       if (vis[k]) continue;       vis[k] = 1;       if (k == y) {         flag = 1;         return;       }       dfs(k);       if (!flag)         vis[k] = 0;       else         return;     }   }   long long cnt = 0;   void dfs2(int u) {     int i, j;     for (i = 0; i < v[u].size(); i++) {       int k = v[u][i];       if (vis[k]) {         continue;       }       vis[k] = 1;       cnt++;       dfs2(k);     }   }   int main() {     int i, j;     cin >> n >> x >> y;     for (i = 1; i <= n - 1; i++) {       int l, r;       cin >> l >> r;       v[l].push_back(r);       v[r].push_back(l);     }     if (n == 1) {       cout << 0 << endl;       return 0;     }     if (n == 2) {       cout << 1 << endl;       return 0;     }     dfs(x);     long long ans = n * (n - 1);     cnt = 0;     dfs2(x);     cnt++;     long long x1 = cnt;     cnt = 0;     dfs2(y);     cnt++;     long long y1 = cnt;     cout << ans - x1 * y1 << endl;     return 0;   }   