A construction site is mapped as a grid of r rows and c columns. Each cell is 1 (clear) or 0 (blocked). Find the area (number of cells) of the largest axis-aligned rectangle that consists entirely of clear cells.
A classic approach builds, row by row, a histogram of consecutive clear cells in each column and applies the largest-rectangle-in-a-histogram computation with a monotonic stack.
Input format
Line 1: two integers r and c.
Next r lines: each a string of exactly c characters, every character 0 or 1.
Output format
A single integer: the area of the largest all-clear rectangle (0 if there are no clear cells).
Constraints
- 1 <= r <= 200
- 1 <= c <= 200
- Every grid character is 0 or 1.