cf/mirror

Connected Cubes

CF
1965E3100· legendary gm4s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
3 4 3
3 2 3 1
1 1 1 1
1 3 3 2
Output
13
1 1 2 3
1 3 2 3
2 1 2 3
2 2 2 3
2 3 2 3
3 3 2 3
1 2 2 2
1 2 3 2
1 3 3 2
1 4 3 2
2 4 3 2
3 4 3 2
3 4 2 2
Sample 2of 2
Input
2 2 2
2 1
1 2
Output
9
1 3 1 1
2 3 1 1
3 1 1 1
3 2 1 1
3 3 1 1
1 1 2 2
1 2 2 2
2 1 2 2
2 2 2 2
1965E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)