func_code_string: #include <bits/stdc++.h>   using namespace std;   vector<vector<int>> tree;   int res = 0;   int dfs(int node, int parent) {     int left = 2;     for (int child : tree[node]) {       if (child == parent) {         continue;       }       int x = dfs(child, node);       if (x == 1 && left > 0) {         ++res;         --left;       }     }     return left > 0;   }   int main() {     int n, x, y;     cin >> n >> x >> y;     vector<int> degs(n, 0);     tree.resize(n);     for (int i = 0; i < n - 1; ++i) {       int a, b;       cin >> a >> b;       --a;       --b;       tree[a].push_back(b);       tree[b].push_back(a);       ++degs[a];       ++degs[b];     }     if (x < y) {       dfs(0, -1);       cout << res * (long long)x + (n - res - 1) * (long long)y <<   n ;     } else {       if (*max_element(degs.begin(), degs.end()) == n - 1) {         cout << (long long)(n - 2) * y + x <<   n ;       } else {         cout << (long long)(n - 1) * y <<   n ;       }     }     return 0;   }   