Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
29700 | easonzhang | 计算鞍点 | C++ | 通过 | 0 MS | 244 KB | 565 | 2023-11-01 20:58:43 |
#include<bits/stdc++.h> using namespace std; int main() { int num[5][5]; for(int i=0;i<5;i++) { for(int j=0;j<5;j++) { cin>>num[i][j]; } } int max,y; for(int i=0;i<5;i++) { max=num[i][0]; y=0; for(int j=0;j<5;j++) { if(num[i][j]>max) { max=num[i][j]; y=j; } } bool flag=true; for(int j=0;j<5;j++) { if(num[j][y]<max) { flag=false; break; } } if(flag==true) { cout<<i+1<<" "<<y+1<<" "<<max; return 0; } } cout<<"not found"; return 0; }