Count every zero entry in a row-major rectangular map.
Task: Count cells equal to zero.
Input format: Rows r, columns c, then r*c integers in row-major order.
Output format: One integer: the zero count.
Constraints: 1 <= r,c <= 100; -10^6 <= entries <= 10^6
Edge rules: Apply the stated zero, tie, boundary, and ordering conventions exactly.
Example 1:
Input: 1 1 5
Output: 0
Example 2:
Input: 2 3 1 2 3 4 5 6
Output: 0
Example 3:
Input: 3 3 1 2 3 4 5 6 7 8 9
Output: 0
Constraints:
1 <= r,c <= 100; -10^6 <= entries <= 10^6
Tags:
matrices counting
Loading...
Test Cases:No test cases
No test cases available.
Empty Cells in Orchard Map - EASY Coding Problem | CodeTikki