#P9004. [RC-07] Abnormal Permutation Tuples
[RC-07] Abnormal Permutation Tuples
Problem Description
You are given three positive integers , , and .
How many ordered -tuples of permutations of , , satisfy:
- Lexicographical order: .
- Inversion count: .
Let be the answer modulo . For all and , output .
Input Format
The input contains one line with three positive integers , , .
Output Format
Output an matrix, where the entry in row and column is .
5 3 23333
1 0 0
2 0 0
6 0 0
24 17 0
120 904 1226
Hint
It is guaranteed that , , and . Note that and will not simultaneously take the values and .
The Constraints for and are as follows:
- Subtask 1 ( points): , .
- Subtask 2 ( points): , .
- Subtask 3 ( points): , .
- Subtask 4 ( points): , .
- Subtask 5 ( points): , .
- Subtask 6 ( points): , .
- Subtask 7 ( points): , .
Translated by ChatGPT 5