QOJ.ac

QOJ

Límite de tiempo: 3 s Límite de memoria: 512 MB Puntuación total: 100

#8187. Gnutella 国际象棋大师

Estadísticas

Alexander 最近在 Chessforces 竞赛网站上获得了极高的评分。他的教练向他提出了一个难题,以考验他的真实水平。

考虑一个 $n \times n$ 的棋盘。象(bishop)是一种国际象棋棋子,它会攻击所有与它处于同一对角线上的位置。非攻击配置是指在棋盘上放置若干个象,使得没有两个象占据相同的位置,且没有任何一个象攻击到另一个象。

Alexander 需要计算对于每个 $k$(从 $1$ 到 $2n - 1$),在 $n \times n$ 棋盘上放置恰好 $k$ 个象的非攻击配置数量。由于答案可能很大,每个数字都需要对一个完全随机的数 $998\,244\,353$ 取模。

输入格式

第一行包含一个整数 $n$ ($1 \le n \le 10^5$)。

输出格式

输出 $2n - 1$ 个整数。其中第 $k$ 个整数应为在 $n \times n$ 棋盘上放置恰好 $k$ 个象的非攻击配置数量(对 $998\,244\,353$ 取模)。

样例

样例输入 1

2

样例输出 1

4 4 0

样例输入 2

3

样例输出 2

9 26 26 8 0

样例输入 3

10

样例输出 3

100 4380 110960 1809464 20014112
154215760 837543200 214861037
625796024 941559921 770927213
837612209 756883449 146369278
295974400 17275136 246784 1024 0

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.