cf/mirror

Filling the Grid

CF
1228B1400· specialist1s256 MB⌨ stdin/stdout

Examples

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