#include<bits/stdc++.h>
using namespace std;
int a[20][20],b[20],c[20];
int main(){
int n,m;
bool f=false;
cin>>n>>m;
for(int i=1;i<=n;i++){
for(int j=1;j<=m;j++){
cin>>a[i][j];
}
}
for(int i=1;i<=n;i++){
int mi=INT_MAX;
for(int j=1;j<=m;j++){
mi=min(mi,a[i][j]);
}
b[i]=mi;
}
for(int j=1;j<=m;j++){
int ma=INT_MIN;
for(int i=1;i<=n;i++){
ma=max(ma,a[i][j]);
}
c[j]=ma;
}
for(int i=1;i<=n;i++){
for(int j=1;j<=m;j++){
if(a[i][j]==c[j]&&a[i][j]==b[i]){
cout<<i<<" "<<j<<" "<<a[i][j]<<endl;
f=true;
return 0;
}
}
}
if(f==false)cout<<"not exist";
}
12-22
671
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
02-09
05-23
3797
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
07-15