public int maximalRectangle(char[][] matrix) {
		// Start typing your Java solution below
		// DO NOT write main() function
		int m = matrix.length;// length
		int n = m == 0 ? 0 : matrix[0].length; // width
		int max = 0;
		// pre-compute the matrix
		int[][] newMatrix = new int[m][n];
		for (int i = 0; i < m; i++) {
			for (int j = n - 1; j >= 0; j--) {
				if (matrix[i][j] == '1') {
					newMatrix[i][j] = j < n - 1 ? newMatrix[i][j + 1] + 1 : 1;
				} else {
					newMatrix[i][j] = 0;
				}
			}
		}

		for (int i = 0; i < m; i++) {
			for (int j = 0; j < n; j++) {
				max = Math.max(max, maxArea(newMatrix, i, j));
				// System.out.println("max: "+max);
				// System.out.println("i: "+i+"j: "+j+"max: "+max);
			}
		}
		return max;

	}