cf/mirror

Two permutations

CF
323C2400· grandmaster6s512 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
3
3 1 2
3 2 1
1
1 2 3 3
Output
1
Sample 2of 2
Input
4
4 3 2 1
2 3 4 1
3
1 2 3 4
1 3 2 1
1 4 2 3
Output
1
1
2
323C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)