func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAXN = 110, MAXK = 22, mod = 1000000007;   struct edge {     int adj, next;   } e[MAXN << 1];   int n, k, f[MAXN][MAXK << 1];   int tot, head[MAXN], temp[MAXK << 1];   inline void AddEdge(int u, int v) {     tot++;     e[tot].adj = v, e[tot].next = head[u];     head[u] = tot;   }   inline void Init() {     scanf( %d%d , &n, &k);     for (int i = 1; i < n; i++) {       int u, v;       scanf( %d%d , &u, &v);       AddEdge(u, v), AddEdge(v, u);     }   }   void DFS(int u, int fa) {     f[u][0] = f[u][k + 1] = 1;     for (int i = head[u]; i; i = e[i].next) {       int &v = e[i].adj;       if (v == fa) continue;       DFS(v, u);       memset(temp, 0, sizeof(temp));       for (int i = 0; i <= 2 * k; i++)         for (int j = 0; j <= 2 * k; j++) {           if (i + j + 1 <= 2 * k + 1)             temp[min(i, j + 1)] =                 (temp[min(i, j + 1)] + (long long)f[u][i] * f[v][j]) % mod;           else             temp[max(i, j + 1)] =                 (temp[max(i, j + 1)] + (long long)f[u][i] * f[v][j]) % mod;         }       memcpy(f[u], temp, sizeof(temp));     }   }   int main() {     Init();     DFS(1, 0);     int ans = 0;     for (int i = 0; i <= k; i++) ans = (ans + f[1][i]) % mod;     printf( %d n , ans);     return 0;   }   