cf/mirror

Magic Squares

CF
178D11500· specialist2s256 MB⌨ stdin/stdout

Examples

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