AtCoder Grand Contest 070
翻译中…
Problem Statement
翻译中…
You are given positive integers $N$ and $K$. Consider an undirected tree $T$ with $(2K + 1)N + 1$ vertices labeled from $1$ to $(2K + 1)N + 1$. Among all such trees, find the number, modulo $998244353$, of trees that satisfy the following condition.
翻译中…
- It is possible to remove all edges from
$T$by repeating the following operation: - Choose a path of length
$2K + 1$and remove all edges in it. Formally, choose a sequence of distinct vertices$v_0, v_1, \dots, v_{2K+1}$such that there exists an edge$(v_i, v_{i+1})$for all$i$such that$0 \leq i \leq 2K$, and remove the edge$(v_i, v_{i+1})$for all$i$such that$0 \leq i \leq 2K$.
翻译中…
Constraints
翻译中…
$1 \leq N \leq 1.3 \times 10^5$$1 \leq K \leq 50$- All input values are integers.
翻译中…
Input
翻译中…
The input is given from Standard Input in the following format:
翻译中…
N K
翻译中…
Output
翻译中…
Print the number, modulo $998244353$, of trees with $(2K + 1)N + 1$ vertices satisfying the condition.
翻译中…
样例
Input #1
2 1
Output #1
8820
For example, consider a tree with edges $(1, 2)$, $(2, 3)$, $(2, 4)$, $(2, 6)$, $(3, 7)$, and $(4, 5)$. By doing the following steps, one can remove all edges from the tree, so it satisfies the condition in the problem statement:
- Choose the path $(1,2,4,5)$ and remove edges $(1,2)$, $(2,4)$, $(4,5)$.
- Choose the path $(6,2,3,7)$ and remove edges $(6,2)$, $(2,3)$, $(3,7)$.

There are $8820$ such trees in total.
Input #2
70 1
Output #2
273892456
Remember to print the count modulo $998244353$.
Input #3
12 29
Output #3
898069699
Input #4
100000 50
Output #4
158600909
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。