Codeforces Round 998 (Div. 3) |
---|
Finished |
You're given integers $$$k$$$ and $$$n$$$. For each integer $$$x$$$ from $$$1$$$ to $$$k$$$, count the number of integer arrays $$$a$$$ such that all of the following are satisfied:
Note that two arrays $$$b$$$ and $$$c$$$ are different if either their lengths are different, or if there exists an index $$$1 \leq i \leq |b|$$$ such that $$$b_i\neq c_i$$$.
Output the answer modulo $$$998\,244\,353$$$.
The first line contains an integer $$$t$$$ ($$$1 \leq t\leq 10^3$$$) — the number of independent test cases.
The only line of each test case contains two integers $$$k$$$ and $$$n$$$ ($$$1 \leq k \leq 10^5, 1\leq n \leq 9\cdot 10^8$$$).
It is guaranteed that the sum of $$$k$$$ over all test cases does not exceed $$$10^5$$$.
For each test case, output $$$k$$$ space-separated integers on a new line: the number of arrays for $$$x=1,2,\ldots,k$$$, modulo $$$998\,244\,353$$$.
32 24 310 6969420
2 3 3 6 6 10 6969420 124188773 124188773 729965558 124188773 337497990 124188773 50981194 729965558 337497990
In the first test case, there are $$$2$$$ arrays $$$a$$$ with $$$|a|\leq 2$$$ and the product of elements equal to $$$1$$$:
There are $$$3$$$ arrays $$$a$$$ with $$$|a|\leq 2$$$ and the product of elements equal to $$$2$$$:
Name |
---|