public static int maxMin(int[][]mx) {
		int m=mx.length,n=m==0?0:mx[0].length;
		int[][]t=new int[m][n];
		for (int i=0;i<m;++i) 
			for (int j=0;j<n;++j)
				if (i==0&&j==0) t[i][j]=mx[i][j];
				else {
					int left=j==0?Integer.MIN_VALUE:t[i][j-1],up=i==0?Integer.MIN_VALUE:t[i-1][j];
					left=Math.min(left, mx[i][j]);up=Math.min(up, mx[i][j]);
					t[i][j]=Math.max(left, up);
				}
		return t[m-1][n-1];
	}