cf/mirror

Swapping Problem

CF
1513F2500· grandmaster2s512 MB⌨ stdin/stdout

Examples

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