|
||||||||||
Set1Time Limit: 8000/5000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 1482 Accepted Submission(s): 471 Problem Description 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.$ Input 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]$. Output For each test case, you should output $n$ integers, $i$-th of them means the probability of $i$ being left in the $S$. Sample Input
Sample Output
Source | ||||||||||
|