cf/mirror

Diverse Game

CF
1994A800· newbie1s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
5
1 1
1
2 1
2
1
1 5
2 4 5 3 1
2 4
1 2 3 4
5 6 7 8
3 3
4 2 1
9 8 3
6 7 5
Output
-1
1
2
4 5 3 1 2
6 7 8 5
2 3 4 1
8 3 9
7 5 6
2 1 4
1994A.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)