cf/mirror

Swap to Rearrange

CF
2192E2100· master5s512 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
4
4
1 1 3 3
2 2 4 4
3
1 2 1
3 3 1
3
1 2 3
2 3 1
4
1 2 2 4
3 1 4 3
Output
2
2 4
-1
0
 
2
3 4
2192E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…