luogu#P16608. [SYSUCPC 2025] Larger or Smaller
[SYSUCPC 2025] Larger or Smaller
Problem Description
In his recent work on permutation properties, investigates the relationship between element values and their indices. A key focus is the cardinality of the set of indices where (called ) and where (called ). To formalize this, he defines as the number of permutations of elements containing exactly larger positions and smaller positions. now aims to characterize this function completely by determining the values of across all valid positive integers and after modulo . Could you help him solve this problem efficiently?
Input Format
The only line contains two integers .
Output Format
There are rows in total. The -th row contains integers. The -th integer represents the result of modulo .
5 998244353
10 10 5 1
10 35 21
5 21
1
Hint
The five permutations of are , and .