You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
453 B
C++

#include <cstdio>
#include <algorithm>
#include <cmath>
using namespace std;
int main()
{
int m,n;
while(~scanf("%d%d",&m,&n))
{
int tmp=0,ans=0,si=0,sj=0;;
for(int i=1; i<=m; i++)
for(int j=1; j<=n; j++){
scanf("%d",&tmp);
if(abs(tmp)>abs(ans))
ans=tmp,si=i,sj=j;
}
printf("%d %d %d\n",si,sj,ans);
}
return 0;
}