Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
6793 柯宇希 计算鞍点 C++ Accepted 0 MS 268 KB 954 2025-03-15 16:13:13

Tests(10/10):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a[10][10],mymax,mymin,x,y; bool f=false; 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++){ mymax=a[i][1]; y=1; for(int j=2;j<=5;j++){ if(mymax<a[i][j]){ mymax=a[i][j]; y=j; } } mymin=a[1][y]; x=1; for(int k=2;k<=5;k++){ if(mymin>a[k][y]){ mymin=a[k][y]; x=k; } } if(mymax==mymin){ cout<<x<<" "<<y<<" "<<a[x][y]; f=true; } } if(f==false) cout<<"not found"; return 0; }