atcoder#ABC216H. [ABC216H] Random Robots
[ABC216H] Random Robots
Score : points
Problem Statement
There are robots on a number line. The -th robot is initially at the coordinate .
The following procedure is going to take place exactly times.
- Each robot chooses to move or not with probability each. The robots that move will simultaneously go the distance of in the positive direction, and the other robots will remain still.
Here, all probabilistic decisions are independent.
Find the probability that no two robots meet, that is, there are never two or more robots at the same coordinate at the same time throughout the procedures, modulo (see Notes).
Notes
It can be proved that the probability in question is always a rational number. Additionally, under the Constraints in this problem, when that value is represented as using two coprime integers and , it can be proved that there uniquely exists an integer such that and . Find this .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
2 2
1 2
374341633
The probability in question is .
We have , so you should print .
2 2
10 100
1
The probability in question may be .
10 832
73 160 221 340 447 574 720 742 782 970
553220346