How many (at most) 1x2 (or 2x1) zeroed submatrices fits in NxN binary matrix?
For:
1 0 0
0 0 0
0 1 0
result will be 3
.
For:
0 0 1 0 0 1 0 0 0
0 1 0 1 0 1 0 1 1
1 0 0 1 0 1 1 0 1
0 1 1 0 1 0 1 0 0
0 0 0 0 1 0 1 1 0
1 1 1 1 0 0 1 0 0
1 0 0 1 1 1 1 1 1
0 0 1 1 0 0 0 0 0
1 0 0 1 0 0 1 1 0
result will be 21
.
And so on.