You are given a grid of rows rows and cols columns where each cell is 1 (land) or 0 (water). An island is a maximal group of land cells connected up/down/left/right (not diagonally). The area of an island is the number of land cells it contains.
Report the area of the largest island, or 0 if there is no land.
Input format
Line 1: two integers rows and cols.
The next rows lines each contain cols integers (each 0 or 1), the grid.
Output format
A single integer: the maximum island area, or 0 if the grid has no land.
Constraints
- 1 <= rows, cols <= 50
- Each cell is 0 or 1.