IntermediateRating 1400
Walks on a Line
Starting at 0, each step moves +1 or −1. How many sequences of n steps end at position x? Print the count mod 1 000 000 007.
Input
n x.
Output
A count.
Sample 1
Input
4 0
Output
6
Sample 2
Input
3 1
Output
3
Output appears here