cf/mirror

Cat, Fox and Swaps

CF
1973E2500· grandmaster2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
7
2
2 1
3
3 1 2
4
3 2 1 4
5
5 3 1 2 4
5
1 2 3 4 5
6
3 2 1 5 4 6
6
1 3 2 4 5 6
Output
6
11
23
29
55
46
58
1973E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…