cf/mirror

Permutation Problem (Simple Version)

CF
1986G12200· master3s128 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
6
1
1
2
1 2
3
2 3 1
5
2 4 1 3 5
12
8 9 7 12 1 10 6 3 2 4 11 5
15
1 2 4 6 8 10 12 14 3 9 15 5 7 11 13
Output
0
1
1
3
9
3
1986G1.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)