func_code_string: #include <bits/stdc++.h>   using namespace std;   const int INF = 1000000007;   int ans, K, n;   vector<int> s[101010];   int fa[101010], f[101010][222][3], g[222][3], sz[101010], jc[222], S[222][222];   void dfs(int x) {     int c, i, y, j, k;     sz[x] = 1;     f[x][0][0] = 1;     c = s[x].size();     for (i = 0; i < c; i++) {       y = s[x][i];       if (fa[x] == y) continue;       fa[y] = x;       dfs(y);       for (j = 0; j <= min(K, sz[x] - 1); j++)         for (k = 0; k <= 2; k++) g[j][k] = f[x][j][k];       for (j = 0; j <= min(K, sz[x] - 1); j++)         for (k = 0; k <= min(K, sz[y] - 1); k++) {           if (j + k <= K) {             f[x][j + k][1] =                 (f[x][j + k][1] + (long long)g[j][0] * f[y][k][0] % INF) % INF;             f[x][j + k][2] =                 (f[x][j + k][2] + (long long)g[j][1] * f[y][k][0] % INF) % INF;             f[x][j + k][2] =                 (f[x][j + k][2] + (long long)g[j][2] * f[y][k][0] % INF) % INF;           }           if (j + k + 1 <= K) {             f[x][j + k + 1][1] =                 (f[x][j + k + 1][1] + (long long)g[j][0] * f[y][k][0] % INF) %                 INF;             f[x][j + k + 1][2] =                 (f[x][j + k + 1][2] + (long long)g[j][1] * f[y][k][0] % INF) %                 INF;             f[x][j + k + 1][2] =                 (f[x][j + k + 1][2] + (long long)g[j][2] * f[y][k][0] % INF) %                 INF;           }         }       sz[x] += sz[y];     }     for (i = 0; i <= min(K, sz[x] - 1); i++)       ans = (ans + (long long)jc[i] * S[K][i] % INF *                        (f[x][i][2] * 2 % INF + (f[x][i][1] + f[x][i][0]) % INF) %                        INF) %             INF,       f[x][i][0] =           ((long long)f[x][i][0] + f[x][i][1] * 2 + f[x][i][2] * 2) % INF;   }   int main() {     int i, x, y, j;     scanf( %d%d , &n, &K);     for (i = 1; i < n; i++) {       scanf( %d%d , &x, &y);       s[x].push_back(y);       s[y].push_back(x);     }     jc[0] = 1;     S[0][0] = 1;     for (i = 1; i <= K; i++) {       jc[i] = (long long)jc[i - 1] * i % INF;       S[i][0] = 0;       for (j = 1; j <= i; j++)         S[i][j] = (S[i - 1][j - 1] + (long long)S[i - 1][j] * j % INF) % INF;     }     dfs(1);     printf( %d n , ans);     return 0;   }   