AtCoder Grand Contest 021
F
Trinity
AtCoder
⌀ 4145
原题
← E→
翻译中…

Problem Statement

翻译中…

We have an $N \times M$ grid. The square at the $i$-th row and $j$-th column will be denoted as $(i,j)$. Particularly, the top-left square will be denoted as $(1,1)$, and the bottom-right square will be denoted as $(N,M)$. Takahashi painted some of the squares (possibly zero) black, and painted the other squares white.

翻译中…

We will define an integer sequence $A$ of length $N$, and two integer sequences $B$ and $C$ of length $M$ each, as follows:

翻译中…
  • $A_i(1\leq i\leq N)$ is the minimum $j$ such that $(i,j)$ is painted black, or $M+1$ if it does not exist.
  • $B_i(1\leq i\leq M)$ is the minimum $k$ such that $(k,i)$ is painted black, or $N+1$ if it does not exist.
  • $C_i(1\leq i\leq M)$ is the maximum $k$ such that $(k,i)$ is painted black, or $0$ if it does not exist.
翻译中…

How many triples $(A,B,C)$ can occur? Find the count modulo $998244353$.

翻译中…

Notice

翻译中…

In this problem, the length of your source code must be at most $20000$ B. Note that we will invalidate submissions that exceed the maximum length.

翻译中…

Constraints

翻译中…
  • $1 \leq N \leq 8000$
  • $1 \leq M \leq 200$
  • $N$ and $M$ are integers.
翻译中…

Partial Score

翻译中…
  • $1500$ points will be awarded for passing the test set satisfying $N\leq 300$.
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

N M

翻译中…

Output

翻译中…

Print the number of triples $(A,B,C)$, modulo $998244353$.

翻译中…

样例

Input #1
2 3
Output #1
64
Since $N=2$, given $B_i$ and $C_i$, we can uniquely determine the arrangement of black squares in each column. For each $i$, there are four possible pairs $(B_i,C_i)$: $(1,1)$, $(1,2)$, $(2,2)$ and $(3,0)$. Thus, the answer is $4^M=64$.
Input #2
4 3
Output #2
2588
Input #3
17 13
Output #3
229876268
Input #4
5000 100
Output #4
57613837
题目信息
题号
agc021_f
时间限制
6 s
内存限制
256 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。