2011-12-14 03:47:02
地址:http://acm.hdu.edu.cn/showproblem.php?pid=2022
题意:中文题。
代码:
# include <stdio.h>
int ABS(int n){return n<0?-n:n;}
int main ()
{
int n, m, x, y ;
int i, j, num, nnum, max ;
while (~scanf ("%d%d", &n, &m))
{
max = -1 ;
for (i = 0 ; i < n ; i++)
for (j = 0 ; j < m ; j++)
{
scanf ("%d", &num) ;
if (ABS(num) > max)
{
max = ABS(num) ;
nnum = num ;
x = i ;
y = j ;
}
}
printf("%d %d %d\n", x+1,y+1,nnum) ;
}
return 0 ;
}