Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
133918 陈骏睿 计算鞍点 C++ Accepted 1 MS 272 KB 856 2025-10-25 10:34:36

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[5][5]={0},max=0,min=1000,h=0,l=0,i=0,j=0; for(i=0;i<5;i++){ for( j=0;j<5;j++) cin>>a[i][j]; } for(i=0;i<5;i++){ max=0; min=1000; for(j=0;j<5;j++){ if(max<a[i][j]){ max=a[i][j]; l=j; } } for(j=0;j<5;j++){ if(min>a[j][l]){ min=a[j][l]; h=j; } } if(max==min) break; } if(max==min)cout<<h+1<<" "<<l+1<<" "<<max<<endl; else cout<<"not found"<<endl; return 0; }