**C++**

```
class Solution {
public:
int maxCount(int m, int n, vector<vector<int>>& ops) {
for (auto op : ops) {
// if (op[0] == 0 || op[1] == 0) continue;
m = min(op[0], m);
n = min(op[1], n);
}
return m * n;
}
};
```

**Java**

```
public class Solution {
public int maxCount(int m, int n, int[][] ops) {
for (int[] op : ops) {
m = Math.min(op[0], m);
n = Math.min(op[1], n);
}
return m * n;
}
}
```

Because there is no test case for operation contains 0. Without the sanity check it still pass. In fact the test implementation behind is not checking this and returns 0 for customized test case like:

```
3
3
[[2,2],[3,3], [3,0]]
```

**Update**

Thanks @sqfan pointing out this check is not needed:

```
// if (op[0] == 0 || op[1] == 0) continue;
```