func_code_string: #include <bits/stdc++.h>   const int INF = 0x3f3f3f3f;   const int kN = 100 + 5;   const int MOD = (int)1e9 + 7;   int n, limit;   int graph[kN][kN];   std::vector<int> edges[kN];   int dp[kN][kN];   void dfs(int u, int fa) {     for (int w = 0; w < n; ++w)       if (graph[u][w] <= limit) dp[u][w] = 1;     for (int v : edges[u]) {       if (fa == v) continue;       dfs(v, u);     }     for (int w = 0; w < n; ++w) {       if (dp[u][w] == 0) continue;       for (int v : edges[u]) {         int slot = 0;         if (v == fa) continue;         for (int r = 0; r < n; ++r) {           if (dp[v][r] == 0) continue;           if (graph[u][r] < graph[u][w] || graph[u][r] == graph[u][w] && r < w)             continue;           if (graph[v][w] < graph[v][r] || graph[v][w] == graph[v][r] && w < r)             continue;           slot += dp[v][r];           if (slot >= MOD) slot -= MOD;         }         dp[u][w] = dp[u][w] * 1ll * slot % MOD;       }     }   }   int main() {     scanf( %d%d , &n, &limit);     for (int i = 0; i < n; ++i)       for (int j = 0; j < n; ++j) graph[i][j] = i == j ? 0 : INF;     for (int i = 0; i < n - 1; ++i) {       int a, b;       scanf( %d%d , &a, &b);       a--;       b--;       edges[a].emplace_back(b);       edges[b].emplace_back(a);       graph[a][b] = graph[b][a] = 1;     }     for (int k = 0; k < n; ++k)       for (int i = 0; i < n; ++i)         for (int j = 0; j < n; ++j)           graph[i][j] = std::min(graph[i][j], graph[i][k] + graph[k][j]);     dfs(0, -1);     int result = 0;     for (int v = 0; v < n; ++v) {       result = (result + dp[0][v]) % MOD;     }     printf( %d n , result);   }   