#P2401. 不等数列
不等数列
Description
Take any permutation of to , and then, between every two adjacent numbers in the permutation, insert > or < according to their relative value. Among all permutations, how many permutations have exactly symbols <$? The answer is taken modulo .
Note: A permutation of refers to a sequence in which each of the numbers from appears exactly once.
Input Format
A single line with two integers, representing and .
Output Format
A single integer representing the answer.
5 2
66
Hint
For of the testdata, .
For of the testdata, .
Translated by ChatGPT 5
京公网安备 11011102002149号