#include<stdio.h>
#include<math.h>
int main(void) {
int m, n;
while(scanf_s("%d%d",&m,&n)!=EOF){
int i, j;
int p=1, q=1;
int tem=0, s;
for (i = 1; i <= m; i++) {
for (j = 1; j <= n; j++) {
scanf_s("%d", &s);
if (i == 1 && j == 1) {
tem = s;
}
if (abs(tem) < abs(s)) {
tem = s;
p = i;
q = j;
}
}
}
printf("%d %d ", p, q);
printf("%d\n", tem);
}
}
A plurality of input data sets, the first line of each of the two integers m and n, the total number of ranks candidates MM, then the integer m rows, each row of n, m, and n are as defined in the description of the topic .
Guess you like
Origin blog.csdn.net/qq_46176868/article/details/104087746
Ranking