最大矩形
class Solution { public int maximalRectangle(char[][] matrix) { int m = matrix.length; if(m==0){ return 0; } int n = matrix[0].length; if(n==0){ return 0; } int[] height = new int[n]; int[] left = new int[n]; int[] right = new int[n]; Arrays.fill(right, n); int maxArea = 0; for(int i=0;i=0;--j) { if(matrix[i][j]=='1') { right[j] = Math.min(cur_right, right[j]); }else { right[j] = n; cur_right = j; } } for(int j=0;j