-->
当前位置:首页 > 题库

PROGRAMMING:Finding the maximum and minimum value in a matrix

Luz5年前 (2021-05-10)题库322
Enter an n × M integer matrix (n < = 10, m < = 10), and then output the maximum and minimum values, and output the subscript of the two values.
###Input format:
Enter the number of rows N and columns m (n < = 10, m < = 10) of the matrix, and then enter all the data in the matrix.
###Output format:
The first line outputs n × M and its subscript. A space between every two items. The second line outputs n × M and its subscript. A space between every two items( If there is the same maximum number, the output row and column should be the minimum, and the row should have priority.)
###Input example:
Here is a set of inputs. For example:
```in
3 4
65 77 21 88
23 99 18 54
19 82 73 99
```
###Output example:
The corresponding output is given here. For example:
```out
max=99 row=1 col=1
min=18 row=1 col=2
```







answer:If there is no answer, please comment