Given a square matrix of (with ) of integers, its matrix minMax is the matrix of such that for all (with ), is the minimum element of the -th row of and is the maximum element of the -th column of .
For instance, if ,
Implement the @min_Max(M)@ function that given the square matrix returns its minMax matrix.
You can use the @min()@ and @max()@ functions of Python, that given a list, they return their minimum and maximum element respectively.
>>> min_Max([[1,2,3],[3,1,2],[2,3,1]]) [[1, 3], [1, 3], [1, 3]] >>> min_Max([[100]]) [[100, 100]] >>> min_Max([[2,2],[2,2]]) [[2, 2], [2, 2]] >>> min_Max([[17, 4],[1,1]]) [[4, 17], [1, 4]] >>> min_Max([[5, 1, 2, 1, -2],[1,21,-1,-2,8],[2,3,1,6,6],[1,2,3,4,5]]) [[-2, 5], [-2, 21], [1, 3], [1, 6]]