cf/mirror

Permutations

CF
187A1500· specialist2s256 MB⌨ stdin/stdout
#greedy

Examples

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