Codeforces Round 850 (Div. 2, based on VK Cup 2022 - Final Round)
F
Wooden Spoon
Codeforces
未评级
原题
← E→
翻译中…

$2^n$ people, numbered with distinct integers from $1$ to $2^n$, are playing in a single elimination tournament. The bracket of the tournament is a full binary tree of height $n$ with $2^n$ leaves.

翻译中…

When two players meet each other in a match, a player with the smaller number always wins. The winner of the tournament is the player who wins all $n$ their matches.

翻译中…

A virtual consolation prize "Wooden Spoon" is awarded to a player who satisfies the following $n$ conditions:

翻译中…
  • they lost their first match;
  • the player who beat them lost their second match;
  • the player who beat that player lost their third match;
  • $\ldots$;
  • the player who beat the player from the previous condition lost the final match of the tournament.
翻译中…

It can be shown that there is always exactly one player who satisfies these conditions.

翻译中…

Consider all possible $(2^n)!$ arrangements of players into the tournament bracket. For each player, find the number of these arrangements in which they will be awarded the "Wooden Spoon", and print these numbers modulo $998\,244\,353$.

翻译中…

Input

翻译中…

The only line contains a single integer $n$ ($1 \le n \le 20$) — the size of the tournament.

翻译中…

There are $20$ tests in the problem: in the first test, $n = 1$; in the second test, $n = 2$; $\ldots$; in the $20$-th test, $n = 20$.

翻译中…

Output

翻译中…

Print $2^n$ integers — the number of arrangements in which the "Wooden Spoon" is awarded to players $1, 2, \ldots, 2^n$, modulo $998\,244\,353$.

翻译中…

Note

翻译中…

In the first example, the "Wooden Spoon" is always awarded to player $2$.

翻译中…

In the second example, there are $8$ arrangements where players $1$ and $4$ meet each other in the first match, and in these cases, the "Wooden Spoon" is awarded to player $3$. In the remaining $16$ arrangements, the "Wooden Spoon" is awarded to player $4$.

翻译中…

样例

Input #1
1
Output #1
0
2
InputCopy OutputCopy
Input #2
2
Output #2
0
0
8
16
InputCopy OutputCopy
Input #3
3
Output #3
0
0
0
1536
4224
7680
11520
15360
InputCopy OutputCopy
题目信息
题号
1786F
时间限制
4 s
内存限制
512 MB

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