Given a rows × cols grid matrix filled with the characters 0 and 1, return the area of the largest rectangle containing only 1s.
Examples
Example 1
- Input
- matrix = [["1", "0", "1", "0", "0"], ["1", "0", "1", "1", "1"], ["1", "1", "1", "1", "1"], ["1", "0", "0", "1", "0"]]
- Output
- 6
Example 2
- Input
- matrix = [["0"]]
- Output
- 0
Example 3
- Input
- matrix = [["1"]]
- Output
- 1
Constraints
1 <= rows, cols <= 200- Each
matrix[i][j]is0or1, as a one-character string.