cf/mirror

Sakurako, Kosuke, and the Permutation

CF
2033E1400· specialist2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
6
5
1 2 3 4 5
5
5 4 3 2 1
5
2 3 4 5 1
4
2 3 4 1
3
1 3 2
7
2 3 1 5 6 7 4
Output
0
0
2
1
0
2
2033E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…