QOJ.ac

QOJ

Time Limit: 4 s Memory Limit: 512 MB Total points: 100 Hackable ✓

#13343. 新年的軍隊

統計

黑衣人 $04$ 是一個非常可怕的人,他有一支由 $n$ 個人構成的軍隊 in's army,而這支軍隊看守著神牪牪。

軍隊每個人有一個等級,每個人等級互不相同。庚子年即將過去,辛丑年即將到來,原來等級第 $i$ 高的人,新的一年等級會變成第 $p_i$ 高,可以發現 $p$ 是一個排列。

對於原來等級第 $i$ 高的人,若 $p_{i} > p_{i+1}$,即他等級沒有原來比他菜的那個人高,他就會不高興,特別的原來等級最低的人不會不高興。

你有一個小弟,早早混入了黑衣人 $04$ 的軍隊,他在過去一年排名為 $k$。並且他打聽到不高興的人(包括他自己)個數為 $m$。

你現在想知道對於 $1\le l\le n$ 的每個 $l$,有多少種可能的排名使得小弟的新一年排名為 $l$,這樣可以方便你之後的救援,方案數對 $998244353$ 取模。

輸入格式

一行三個整數,輸入 $n,m,k$。

輸出格式

輸出一行 $n$ 個整數,表示對於 $1\le l\le n$ 的每個 $l$,可能的排名數對 $998244353$ 取模後的結果。

範例

輸入 1

4 2 1

輸出 1

1 2 4 4

輸入 2

5 0 2

輸出 2

0 1 0 0 0

輸入 3

11 2 4

輸出 3

14880 14160 12816 11640 11496 12480 13896 15093 15696 15600 14880

輸入 4

見下載檔案中的 ex_army4.inex_army4.ans,該範例符合子任務 $3$ 的限制。

資料範圍

對於 $100\%$ 的資料,保證 $1\le n\le 5\times 10^5; 0\le m\le n-1; 1\le k\le n$。

子任務編號 特殊限制 分值
$1$ $n\le 10$ $5$
$2$ $n\le 300$ $15$
$3$ $n\le 3\times 10^3$ $15$
$4$ $n\le 10^5$ $35$
$5$ $k=1$ $15$
$6$ 無特殊限制 $15$

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.