Min-Max Matrix

Given a square matrix M of n × n (with n ≥ 1) of integers, its matrix
minMax is the matrix mM of n × 2 such that for all i (with 0 ≤ i < n),
mM[i][0] is the minimum element of the i-th row of M and mM[i][1] is the
maximum element of the i-th column of M.

For instance, if M = [[1, 2, 3], [3, 1, 2], [2, 3, 1]],
mM = [[1, 3], [1, 3], [1, 3]]

Implement the @min_Max(M)@ function that given the square matrix M
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.

Sample session

Problem information

Author: Professors Informàtica EEBE

Generation: 2026-01-25T17:41:16.984Z

© Jutge.org, 2006–2026.
https://jutge.org
