#include <iostream>
#include <iomanip>
#include <cstring>
#include <string>
#include <cmath>
using namespace std;
// string a;
// int tong[26];
int main() {
int a[6][6];
for (int i = 1; i <= 5; i++) {
for (int j = 1; j <= 5; j++) {
cin >> a[i][j];
}
}
for (int i = 1; i <= 5; i++) {
int mx = -1, mxj, mxi;
for (int j = 1; j <= 5; j++) {
if (a[i][j] > mx) {
mx = a[i][j];
mxj = j;
mxi = i;
}
}
int mn = 99999;
for (int k = 1; k <= 5; k++) {
if (a[k][mxj] < mn) {
mn = a[k][mxj];
}
}
if (mx == mn) {
cout << mxi << " " << mxj << " " << mx;
return 0;
}
}
cout << "not found";
}
计算鞍点c++
最新推荐文章于 2023-12-16 22:42:48 发布