cf/mirror

Positions in Permutations

CF
285E2600· international gm2s256 MB⌨ stdin/stdout

Examples

Sample 1of 5
Input
1 0
Output
1
Sample 2of 5
Input
2 1
Output
0
Sample 3of 5
Input
3 2
Output
4
Sample 4of 5
Input
4 1
Output
6
Sample 5of 5
Input
7 4
Output
328
285E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)