func_code_string: #include <bits/stdc++.h>   const long long MAXN = 80000 + 5;   std::vector<long long> G[MAXN];   long long n;   long long sz[MAXN], fa[MAXN];   inline void dfs1(long long v, long long faa = 0) {     sz[v] = 1;     fa[v] = faa;     for (auto x : G[v]) {       if (x == faa) continue;       dfs1(x, v);       sz[v] += sz[x];     }   }   long long ans = 0ll;   inline long long C(long long x) { return 1ll * x * (x - 1) / 2; }   signed main() {     scanf( %lld , &n);     for (register long long i = 1; i <= n - 1; ++i) {       long long u, v;       scanf( %lld%lld , &u, &v);       G[u].push_back(v);       G[v].push_back(u);     }     dfs1(1);     ans = C(n) * C(n);     for (register long long i = 1; i <= n; ++i) {       long long num2 = C(sz[i]), num1 = C(n);       for (auto x : G[i]) {         if (x == fa[i]) {           num1 -= C(n - sz[i]);           continue;         }         num2 -= C(sz[x]);         num1 -= C(sz[x]);       }       ans -= (2ll * num1 * num2 - num2 * num2);     }     std::cout << ans << std::endl;     return 0;   }   