

The first line of input contains an integer 'T' representing the number of the test cases. Then ‘T' test cases follow.
The first line of each test case contains two space-separated integers, 'N', 'M', the dimensions of the matrix.
Next ‘N’ lines consist of ‘M’ space-separated integers denoting the matrix elements. Each element is either 0 or 1, as described in the problem statement.
For each test case, return the sum of coverage of all the 0s in the matrix.
You do not need to print anything; it has already been taken care of. Just implement the given function.
1 <= T <= 10
1 <= N, M <= 10^3
Time limit: 1 second
For any 0 we just need to check its four adjacent sides and look for 1s in them. Therefore we could simply traverse the matrix, and if the current element is a 0, check how many of its adjacent neighbors are 1s and add this value to an integer variable ANS representing the result. In the end, return the value of ANS.