1895: The largest and smallest elements in a two-dimensional array
内存限制:128 MB
时间限制:1.000 S
评测方式:文本比较
命题人:
提交:17
解决:9
题目描述
Given m rows and n columns of data, please program to find the maximum and minimum numbers, and point out their positions. The position of the upper left corner is agreed to be [0, 0]. Suppose there is only one maximum number and minimum number.
输入
There are many cases. In each case, there are two integers m and n in the first row, indicating that there are m rows and n columns below.
输出
Follow the sample output.
样例输入 复制
4 6
78 89 189 90 66 65
23 96 88 78 47 59
98 97 99 95 94 99
78 7 99 87 88 89
2 2
1 2
-1 -2
样例输出 复制
Case 1:
The maximum number is 189, in row 0, column 2.
The smallest number is 7, in row 3, column 1.
Case 2:
The maximum number is 2, in row 0, column 1.
The smallest number is -2, in row 1, column 1.