cf/mirror

Two Arrays And Swaps

CF
1353B800· newbie1s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
5
2 1
1 2
3 4
5 5
5 5 6 6 5
1 2 5 4 3
5 3
1 2 3 4 5
10 9 10 10 9
4 0
2 2 4 3
2 4 2 3
4 4
1 2 2 1
4 4 5 4
Output
6
27
39
11
17
1353B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)