cf/mirror

Fill in the Matrix

CF
1868A1300· pupil2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
4
4 3
1 16
6 6
2 1
Output
3
1 0 2
0 2 1
1 0 2
0 2 1
2
14 7 15 4 10 0 8 6 1 2 3 5 9 11 12 13
6
3 0 1 4 2 5
5 2 1 0 4 3
1 3 2 4 5 0
4 1 3 2 5 0
4 2 5 3 0 1
2 4 0 5 1 3
0
0
0
1868A.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)