acm2022

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/a736933735/article/details/44263351
import java.util.*;


public class acm2022 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while (in.hasNext()) {
int m = in.nextInt();
int n = in.nextInt();
int pos = 0;
int max = in.nextInt();
for (int i = 1; i < n * m; i++) {
int curr = in.nextInt();
if (Math.abs((double) max) < Math.abs((double) curr)) {
max = curr;
pos = i;
}
}


System.out.println((pos / n + 1) + " " + (pos % n + 1) + " " + max);
}
}
}

猜你喜欢

转载自blog.csdn.net/a736933735/article/details/44263351