#include <iostream>
#include <cmath>
using namespace std;
int fabs(int n)
{
//return n>0?n:-n;
if(n>0)
return n;
else
return -n;
}
int main()
{
int r,c;
int row=0,col=0;
cin>>r>>c;
int num[r][c];
for(int i=0;i<r;++i)
for(int j=0;j<c;++j)
cin>>num[i][j];
int max=-100000000;
for(int i=0;i<r;++i)
for(int j=0;j<c;++j)
{
if(fabs(num[i][j])>max)
{
max=fabs(num[i][j]);
row=i+1;
col=j+1;
}
}
cout<<row<<" "<<col<<" "<<num[row-1][col-1]<<endl;
return 0;
}
能强调下在哪不···· = =
追答多组输入,我把你的cin>>r>>c用while包住了