There are
Valid ways are considered different if at least one person takes a different marble, even of the same colour.
Constraints
Subtask 1 [5%]
Subtask 2 [15%]
Subtask 3 [80%]
No additional constraints.
Input Specification
The first line contains two space-separated integers,
The next line contains
Output Specification
Output the number of valid ways to choose marbles, modulo
Sample Input
Copy
2 3
1 2 1
Sample Output
Copy
10
Explanation for Sample
Let
The ten ways for two people to choose marbles are:
Comments