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$ となるような順列の組み合わせが何通りあるかを知りたい。これにより、後の救出作戦が容易になる。答えは $998244353$ で割った余りを求めよ。

入力

一行に3つの整数 $n, m, k$ が与えられる。

出力

一行に $n$ 個の整数を出力せよ。$l$ 番目の整数は、$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.in および ex_army4.ans を参照のこと。このサンプルは小課題 $3$ の制約を満たしている。

制約

すべてのデータにおいて、$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.