描述 |
---|
Given a m * n matrix, consists of 0 and 1, we need to calculate the number of rectangle that meet the following conditions: = child rectangle, the value of the four vertices 1. Such as: 10101 00111 10001 Four vertices 1, is a meet the conditions of the rectangle. |
输入 |
The input consists of several test cases. For each case, The first line contains two integers m and n. (1 < = m, n < = 100). The following m lines, each line has a number n, said 01 matrix |
输出 |
The number of rectangles in the meet the conditions. |
样例输入 |
1 3 1 1 1 2 3 1 0 1 0 1 1 3 3 1 0 1 0 1 1 1 1 1 |
样例输出 |
0 0 2 |
HINT |
来源 |
XUJC OJ |