cf/mirror

Permutation Swap

CF
1828B900· newbie1s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
7
3
3 1 2
4
3 4 1 2
7
4 2 6 7 5 3 1
9
1 6 7 4 9 2 3 8 5
6
1 5 3 4 2 6
10
3 10 5 2 9 6 7 8 1 4
11
1 11 6 4 8 3 7 5 9 10 2
Output
1
2
3
4
3
2
3
1828B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)