|
#include<iostream>
#include<cstdio>
using namespace std;
int main(){
int i,j,num[5][5],k,max,x,y,min;
for (i=0;i<5;i++)
{
for (j=0;j<5;j++)
cin>>num[i][j];
}
for (i=0;i<5;i++)
{
max = 0;
for (j=0;j<5;j++)
{
if (num[i][j]>max)
{
max = num[i][j];
x=i;
y=j;
}
}
min = max;
for (k=0;k<5;k++)
{
if (num[k][y]<min)
min = num[k][y];
}
if (min == max)
{
cout<<x+1<<" "<<y+1<<" "<<max;
return 0;
}
}
cout<<"not found";
return 0;
}
|
|