杭电OJ2022
作者:互联网
#include<stdio.h>
int change(int num)
{
if (num < 0)
{
num =~(num - 1);
}
return num;
}
int main()
{
int m, n;
int arr[100][100];
while (scanf("%d%d", &m, &n) != EOF)
{
int x = 0,y = 0;
for (int i = 0; i < m; i++)
{
for (int j = 0; j < n; j++)
{
scanf("%d", &arr[i][j]);
}
}
int max = arr[0][0];
for (int i = 0; i < m; i++)
{
for (int j = 0; j < n; j++)
{
if (change(max) < change(arr[i][j]))
{
x = i;
y = j;
max = arr[i][j];
}
}
}
printf("%d %d %d\n", x+1, y+1, max);
}
}
标签:arr,OJ2022,int,max,杭电,++,num,change 来源: https://blog.csdn.net/weixin_53564801/article/details/121090971