当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6825:Set1

题目描述
You are given a set $S=\{1..n\}$. It guarantees that n is odd. You have to do the following operations until there is only $1$ element in the set:

Firstly, delete the smallest element of $S$. Then randomly delete another element from $S$.

For each $i \in [1,n]$, determine the probability of $i$ being left in the $S$.

It can be shown that the answers can be represented by $\frac{P}{Q}$, where $P$ and $Q$ are coprime integers, and print the value of $P \times Q^{-1} \space mod $ $\space 998244353.$
输入解释
The first line containing the only integer $T(T \in [1,40])$ denoting the number of test cases.

For each test case:

The first line contains a integer $n$ .

It guarantees that: $ \sum n \in [1,5 \times 10^6]$.
输出解释
For each test case, you should output $n$ integers, $i$-th of them means the probability of $i$ being left in the $S$.
输入样例
1
3
输出样例
0 499122177 499122177
来自杭电HDUOJ的附加信息
Recommend IceyWang

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6825

最后修改于 2020-10-25T23:34:43+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
8000/5000MS(Java/Others) 524288/524288K(Java/Others)