#abc225h. [abc225_h]Social Distance 2
[abc225_h]Social Distance 2
Problem Statement
There are chairs arranged in a row, called Chair , Chair , , Chair .
A chair seats only one person.
people will sit on of these chairs. Here, let us define the score as follows:
, where is the sorted list of the indices of the chairs the people sit on.
Person is already sitting on Chair .
There are ways for the other people to take seats. Find the sum of the scores for all of these ways.
Since this sum may be enormous, compute it modulo .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
Sample Input 1
5 3 2
1 3
Sample Output 1
7
If Person sits on Chair , the score will be .
If Person sits on Chair , the score will be .
If Person sits on Chair , the score will be .
The answer is .
Sample Input 2
6 6 1
4
Sample Output 2
120
The score for every way of sitting will be .
There are ways of sitting, so the answer is .
Sample Input 3
99 10 3
10 50 90
Sample Output 3
761621047