Count 2×2 Blocks by Number of Black Cells

Given an m × n grid with row indices in [0, m - 1] and column indices in [0, n - 1], some cells are black. The coordinates of black cells are given in coordinates; all other cells are white.

...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: