cf/mirror

Lucky Permutation

CF
1768D1800· expert1s256 MB⌨ stdin/stdout

Examples

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