AT_jag2018summer_day2_k Short LIS
Description
[problemUrl]: https://atcoder.jp/contests/jag2018summer-day2/tasks/jag2018summer_day2_k
You are given three integers $ N $, $ A $, and $ B $.
Let $ P=(P_0,P_1,...,P_{N-1}) $ be a permutation of $ (0,1,...,N-1) $. $ P $ is said **good** if and only if it satisfies all of the following conditions:
- The length of a longest increasing subsequence of $ P $ is at most $ 2 $.
- $ P_A\ =\ B $
Count the number of good permutations modulo $ 10^9+7 $.
Input Format
Input is given from Standard Input in the following format:
> $ N $ $ A $ $ B $
Output Format
Print the number of good permutations modulo $ 10^9+7 $.
Explanation/Hint
### Constraints
- $ 1\ \leq\ N\ \leq\ 10^6 $
- $ 0\ \leq\ A\ \leq\ N-1 $
- $ 0\ \leq\ B\ \leq\ N-1 $
### Sample Explanation 1
The only good permutation is $ (0,2,1) $.