#include<bits/stdc++.h>
using namespace std;
int main()
{
int a[6][6] = {0};
int local[6] = {0};
for (int i = 1;i < 6;i++){
int max = 0;
int loc = 0;
for (int j = 1;j < 6;j++){
cin>>a[i][j];
if (a[i][j] > max){
max = a[i][j];
loc = j;
}
}
local[i] = loc;
}
for (int i = 1;i < 6;i++){
int min = a[i][local[i]];
int flag = 1;
for (int j = 1;j < 6;j++){
if (a[j][local[i]] < min){
flag = 0;
}
}
if (flag == 1){
cout << i<<" "<< local[i]<<" "<<a[i][local[i]];
return 0;
}
if (i == 5 && flag == 0){
cout <<"not found";
}
}
return 0;
}
洛谷 B2102 计算鞍点
最新推荐文章于 2024-09-02 13:43:09 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)