logo AlgoBeat OnlineJudge
登录 注册

#216413. [SYSUCPC 2025] Larger or Smaller

内存限制:256 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

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?

输入格式

The only line contains two integers .

输出格式

There are rows in total. The -th row contains integers. The -th integer represents the result of modulo .

样例

样例输入 1

5 998244353

样例输出 1

10 10 5 1
10 35 21
5 21
1

数据范围与提示

The five permutations of are , and .