LearnPy Hub
← Arena
AdvancedRating 1800

Biggest Rectangle of Ones

Print the area of the largest rectangle containing only 1s in the 0/1 grid.

Input

r and c, then r strings of 0s and 1s.

Output

One integer.

Sample 1

Input
4 5
10100
10111
11111
10010
Output
6

Sample 2

Input
1 1
0
Output
0
solution.py
Output appears here
Biggest Rectangle of Ones · Python Arena problem · LearnPy Hub