#include<iostream>
#include<cmath>
using namespace std;
int main(void)
{
int m, n, p, q, t, y, j;
int max = 0;
int a[10][10];
while(cin >> m >> n){
for(p = 1; p <= m; p++)
for(q = 1; q <= n; q++){
cin >> t;
a[p][q] = t;
}
for(p = 1; p <= m; p++)
for(q = 1; q <= n; q++){
if(abs(max) < abs(a[p][q])){
max = a[p][q];
y = p;
j = q;
}
}
cout << y <<" " << j << " " << max;
}
return 0;
}
输入行与列,找出其中最大值
最新推荐文章于 2022-07-03 12:38:01 发布