Problem Statement
There is a tree with $N$ vertices numbered $1$ to $N$. The $i$-th edge connects vertices $A_i$ and $B_i$.
Let us keep performing the following operation until each connected component of the graph has $K$ or fewer vertices.
- From the
$N$vertices, choose one uniformly at random that belongs to a connected component with$K+1$or more vertices. Delete all edges with the chosen vertex as an endpoint.
Find the expected value of the number of times the operation is performed, modulo $998244353$.
How to print an expected value modulo $\text{mod }{998244353}$ It can be proved that the sought expected value is always a rational number. Additionally, under the constraints of this problem, it can also be proved that when that value is represented as an irreducible fraction $\frac{P}{Q}$, we have $Q \not \equiv 0 \pmod{998244353}$. Thus, there is a unique integer $R$ such that $R \times Q \equiv P \pmod{998244353}, 0 \leq R < 998244353$. Report this $R$.
Constraints
$1 \leq K < N \leq 100$$1 \leq A_i,B_i \leq N$- The given graph is a tree.
- All input values are integers.
Input
The input is given from Standard Input in the following format:
N K
A_1 B_1
A_2 B_2
\vdots
A_{N-1} B_{N-1}
Output
Print the answer.
样例
4 2
1 2
2 3
2 4
249561090
20 10
16 8
6 2
18 3
3 12
5 1
13 9
13 19
3 11
5 13
17 6
8 14
1 16
16 20
11 15
3 10
15 4
5 18
1 7
1 17
181196154
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。