QOJ.ac

QOJ

実行時間制限: 2 s メモリ制限: 256 MB 満点: 100

#3903. 函数分析

統計

设 $p$ 为序列 $(1, 2, 3, \dots, n-1, n)$,$q$ 为从 $p$ 中随机抽取的 $m \le n$ 个元素的样本,其中 $q$ 的每个元素都是等概率且独立地从 $p$ 中选取的。

定义 $nth(a, b)$ 为序列 $a$ 按非递减顺序排列后第 $b$ 个位置上的元素。例如,$nth(a = (5, 2, 3, 2), b = 4) = 5$。

对于每个满足 $d \le m \le n$ 的 $m$,求 $nth(p, k) < nth(q, d)$ 的概率,结果对 $998244353$ 取模。换句话说,如果所求概率为 $\frac{P}{Q}$,请输出 $P \cdot Q^{-1} \pmod{998244353}$。

输入格式

输入包含一行,由空格分隔的三个整数 $n, d, k$。

$1 \le k \le n \le 3 \cdot 10^5$ $1 \le d \le n$

输出格式

输出 $n - d + 1$ 行,每行包含一个整数,表示对于从 $d$ 到 $n$(包含 $d$ 和 $n$)的每个 $m$ 所求的概率(模 $998244353$)。

样例

输入 1

5 2 3

输出 1

119789323
15971910
552628074
239898083

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.