Number Of Permutations
1207D1800· expert2s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
31 12 23 1
Output
3
Sample 2of 3
Input
42 32 22 12 4
Output
0
Sample 3of 3
Input
31 11 12 3
Output
4
58%
1207D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)