{"raw_statement":[{"iden":"statement","content":"Ostap already settled down in Rio de Janiero suburb and started to grow a tree in his garden. Recall that a tree is a connected undirected acyclic graph.\n\nOstap's tree now has _n_ vertices. He wants to paint some vertices of the tree black such that from any vertex _u_ there is at least one black vertex _v_ at distance no more than _k_. Distance between two vertices of the tree is the minimum possible number of edges of the path between them.\n\nAs this number of ways to paint the tree can be large, Ostap wants you to compute it modulo 109 + 7. Two ways to paint the tree are considered different if there exists a vertex that is painted black in one way and is not painted in the other one."},{"iden":"input","content":"The first line of the input contains two integers _n_ and _k_ (1 ≤ _n_ ≤ 100, 0 ≤ _k_ ≤ _min_(20, _n_ - 1)) — the number of vertices in Ostap's tree and the maximum allowed distance to the nearest black vertex. **Don't miss** the unusual constraint for _k_.\n\nEach of the next _n_ - 1 lines contain two integers _u__i_ and _v__i_ (1 ≤ _u__i_, _v__i_ ≤ _n_) — indices of vertices, connected by the _i_\\-th edge. It's guaranteed that given graph is a tree."},{"iden":"output","content":"Print one integer — the remainder of division of the number of ways to paint the tree by 1 000 000 007 (109 + 7)."},{"iden":"examples","content":"Input\n\n2 0\n1 2\n\nOutput\n\n1\n\nInput\n\n2 1\n1 2\n\nOutput\n\n3\n\nInput\n\n4 1\n1 2\n2 3\n3 4\n\nOutput\n\n9\n\nInput\n\n7 2\n1 2\n2 3\n1 4\n4 5\n1 6\n6 7\n\nOutput\n\n91"},{"iden":"note","content":"In the first sample, Ostap has to paint both vertices black.\n\nIn the second sample, it is enough to paint only one of two vertices, thus the answer is 3: Ostap can paint only vertex 1, only vertex 2, vertices 1 and 2 both.\n\nIn the third sample, the valid ways to paint vertices are: {1, 3}, {1, 4}, {2, 3}, {2, 4}, {1, 2, 3}, {1, 2, 4}, {1, 3, 4}, {2, 3, 4}, {1, 2, 3, 4}."}],"translated_statement":[{"iden":"statement","content":"Ostap 已经在里约热内卢的郊区安顿下来，并开始在自己的花园里种一棵树。回忆一下，树是一个连通的无向无环图。\n\nOstap 的树现在有 #cf_span[n] 个顶点。他希望将树的某些顶点涂成黑色，使得从任意顶点 #cf_span[u] 出发，都存在至少一个黑色顶点 #cf_span[v]，其距离不超过 #cf_span[k]。树中两个顶点之间的 #cf_span(class=[tex-font-style-underline], body=[Distance]) 定义为连接它们的路径上最少的边数。\n\n由于涂色方案的数量可能很大，Ostap 希望你计算其对 #cf_span[109 + 7] 取模的结果。两种涂色方案不同，当且仅当存在某个顶点在一种方案中被涂黑而在另一种方案中未被涂黑。\n\n输入的第一行包含两个整数 #cf_span[n] 和 #cf_span[k]（#cf_span[1 ≤ n ≤ 100]，#cf_span[0 ≤ k ≤ min(20, n - 1)]）——分别表示 Ostap 的树的顶点数和到最近黑色顶点的最大允许距离。*请注意* #cf_span[k] 的非同寻常的约束条件。\n\n接下来的 #cf_span[n - 1] 行每行包含两个整数 #cf_span[ui] 和 #cf_span[vi]（#cf_span[1 ≤ ui, vi ≤ n]）——表示第 #cf_span[i] 条边连接的两个顶点的编号。保证给出的图是一棵树。\n\n请输出一个整数——将涂色方案数对 #cf_span[1 000 000 007]（#cf_span[109 + 7]）取模后的余数。\n\n在第一个样例中，Ostap 必须将两个顶点都涂成黑色。\n\n在第二个样例中，只需将两个顶点中的一个涂黑即可，因此答案是 #cf_span[3]：Ostap 可以只涂顶点 #cf_span[1]，只涂顶点 #cf_span[2]，或者同时涂顶点 #cf_span[1] 和 #cf_span[2]。\n\n在第三个样例中，合法的涂色方案为：#cf_span[{1, 3}]，#cf_span[{1, 4}]，#cf_span[{2, 3}]，#cf_span[{2, 4}]，#cf_span[{1, 2, 3}]，#cf_span[{1, 2, 4}]，#cf_span[{1, 3, 4}]，#cf_span[{2, 3, 4}]，#cf_span[{1, 2, 3, 4}]。"},{"iden":"input","content":"输入的第一行包含两个整数 #cf_span[n] 和 #cf_span[k]（#cf_span[1 ≤ n ≤ 100]，#cf_span[0 ≤ k ≤ min(20, n - 1)]）——分别表示 Ostap 的树的顶点数和到最近黑色顶点的最大允许距离。*请注意* #cf_span[k] 的非同寻常的约束条件。接下来的 #cf_span[n - 1] 行每行包含两个整数 #cf_span[ui] 和 #cf_span[vi]（#cf_span[1 ≤ ui, vi ≤ n]）——表示第 #cf_span[i] 条边连接的两个顶点的编号。保证给出的图是一棵树。"},{"iden":"output","content":"请输出一个整数——将涂色方案数对 #cf_span[1 000 000 007]（#cf_span[109 + 7]）取模后的余数。"},{"iden":"examples","content":"输入\n2 0\n1 2\n输出\n1\n\n输入\n2 1\n1 2\n输出\n3\n\n输入\n4 1\n1 2\n2 3\n3 4\n输出\n9\n\n输入\n7 2\n1 2\n2 3\n1 4\n4 5\n1 6\n6 7\n输出\n91"},{"iden":"note","content":"在第一个样例中，Ostap 必须将两个顶点都涂成黑色。\n\n在第二个样例中，只需将两个顶点中的一个涂黑即可，因此答案是 #cf_span[3]：Ostap 可以只涂顶点 #cf_span[1]，只涂顶点 #cf_span[2]，或者同时涂顶点 #cf_span[1] 和 #cf_span[2]。\n\n在第三个样例中，合法的涂色方案为：#cf_span[{1, 3}]，#cf_span[{1, 4}]，#cf_span[{2, 3}]，#cf_span[{2, 4}]，#cf_span[{1, 2, 3}]，#cf_span[{1, 2, 4}]，#cf_span[{1, 3, 4}]，#cf_span[{2, 3, 4}]，#cf_span[{1, 2, 3, 4}]。"}],"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $ be the number of vertices in a tree $ T = (V, E) $, where $ |V| = n $, $ |E| = n-1 $.  \nLet $ k \\in \\mathbb{Z}_{\\geq 0} $, $ k \\leq \\min(20, n-1) $, be the maximum allowed distance from any vertex to the nearest black vertex.  \nLet $ \\mathcal{P} \\subseteq 2^V $ be the set of all valid vertex colorings (subsets of black vertices) such that for every $ u \\in V $, there exists $ v \\in S $ with $ \\text{dist}(u,v) \\leq k $, where $ S \\in \\mathcal{P} $.\n\n**Constraints**  \n1. $ 1 \\leq n \\leq 100 $  \n2. $ 0 \\leq k \\leq \\min(20, n-1) $  \n3. The graph is a tree.  \n\n**Objective**  \nCompute $ |\\mathcal{P}| \\mod (10^9 + 7) $, the number of subsets $ S \\subseteq V $ such that every vertex in $ V $ is within distance at most $ k $ from at least one vertex in $ S $.","simple_statement":null,"has_page_source":false}