public static int maxMatrix(int[][]A, int target) {
		int m=A.length, n=A[0].length;
		int[][]t=new int[m][n];
		for (int i=0;i<m;++i)
			for (int j=0;j<n;++j)
				if (j==0)
					t[i][j]=A[i][j];
				else 
					t[i][j]=A[i][j]+t[i][j-1];
		int[]B=new int[m];
		int rel=0;
		for (int l=0; l<m;++l)
			for (int r=l; r<n;++r) {
				for (int i=0;i<m;++i)
					B[i]=t[i][r]-(l!=0?t[i][l-1]:0);
				rel=Math.max(maxWindow(B, target)*(r-l+1),rel);
			}
		return rel;
	}