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≤i≤|b| such that bi≠ci.
Output the answer modulo 998244353.
The first line contains an integer t (1≤t≤103) — the number of independent test cases.
The only line of each test case contains two integers k and n (1≤k≤105,1≤n≤9⋅108).
It is guaranteed that the sum of k over all test cases does not exceed 105.
For each test case, output k space-separated integers on a new line: the number of arrays for x=1,2,…,k, modulo 998244353.
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|≤2 and the product of elements equal to 1:
There are 3 arrays a with |a|≤2 and the product of elements equal to 2:
Name |
---|