cf/mirror

Magic Square

CF
1864G3100· legendary gm2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
4
3
1 2 3
4 5 6
7 8 9
7 2 3
1 4 5
6 8 9
3
1 2 3
4 5 6
7 8 9
3 2 1
6 5 4
9 7 8
3
1 2 3
4 5 6
7 8 9
7 8 1
2 3 4
5 6 9
3
1 2 3
4 5 6
7 8 9
3 8 4
5 1 9
7 6 2
Output
1
0
0
4
1864G.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)