atcoder#CF16EXHIBITIONFINALJ. 123 Pairs
123 Pairs
Score : points
Problem Statement
Consider all integers between and , inclusive. Snuke wants to divide these integers into pairs such that:
- Each integer between and is contained in exactly one of the pairs.
- In exactly pairs, the difference between the two integers is .
- In exactly pairs, the difference between the two integers is .
- In exactly pairs, the difference between the two integers is .
Note that the constraints guarantee that , thus no pair can have the difference of or more.
Compute the number of ways to do this, modulo .
Constraints
Input
The input is given from Standard Input in the following format:
Output
Print the answer.
3 1 2 0
2
There are two possibilities: or .
600 100 200 300
522158867