Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.
ContestId |
Name |
Phase |
Frozen |
Duration (Seconds) |
Relative Time |
Start Time |
---|---|---|---|---|---|---|
1930 | think-cell Round 1 | FINISHED | False | 10800 | 23642699 | Feb. 17, 2024, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1149 ) | E | 2..3...4.... Wonderful! Wonderful! | PROGRAMMING | combinatorics math |
B'Stack has an array a of length n such that a_i = i for all i ( 1 <= q i <= q n ). He will select a positive integer k ( 1 <= q k <= q lfloor frac{n-1}{2} rfloor ) and do the following operation on a any number (possibly 0 ) of times. Stack wonders how many arrays a can he end up with for each k ( 1 <= q k <= q lfloor frac{n-1}{2} rfloor ). As Stack is weak at counting problems, he needs your help. Since the number of arrays might be too large, please print it modulo 998 ,244 ,353 . ^ dagger A sequence x is a subsequence of a sequence y if x can be obtained from y by deleting several (possibly, zero or all) elements. For example, [1, 3] , [1, 2, 3] and [2, 3] are subsequences of [1, 2, 3] . On the other hand, [3, 1] and [2, 1, 3] are not subsequences of [1, 2, 3] . Each test contains multiple test cases. The first line contains a single integer t ( 1 <= q t <= q 2 cdot 10^3 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains a single integer n ( 3 <= q n <= q 10^6 ) -- the length of the array a . It is guaranteed that the sum of n over all test cases does not exceed 10^6 . For each test, on a new line, print lfloor frac{n-1}{2} rfloor space-separated integers -- the i -th integer representing the number of arrays modulo 998 ,244 ,353 that Stack can get if he selects k=i . In the first test case, two a are possible for k=1 : In the second test case, four a are possible for k=1 : In the third test case, two a are possible for k=2 : '... |
think-cell Round 1 Editorial |
No solutions yet.