#P1680. 奇怪的分组
奇怪的分组
Description
There are people in V-shen’s class. dm wants to split them into groups. The number of people in the -th group must be greater than the given positive integer . How many different plans are there? Two plans are considered the same if and only if, for every , the sizes of the -th group are equal in both plans. Since the answer can be large, output it modulo .
Input Format
The first line contains two integers and . The next lines each contain one integer, denoting .
Output Format
Output a single line containing one integer — the number of plans modulo .
10 3
1
2
3
3
Hint
Sample Explanation: There are three plans, with group sizes , , and .
Constraints:
- For of the testdata, .
- For of the testdata, .
- For of the testdata, , .
The testdata guarantees that there is at least one valid plan.
Translated by ChatGPT 5
京公网安备 11011102002149号