Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
8077 | 詹梓涵 | 计算鞍点 | C++ | Accepted | 0 MS | 260 KB | 1024 | 2025-06-14 08:49:38 |
#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[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 pos_max=1; int _max=a[i][1]; for(int j=2;j<=5;j++){ if(_max<a[i][j]){ _max=a[i][j]; pos_max=j; } } int _min=a[1][pos_max]; int pos_min=1; for(int k=1;k<=5;k++) if(_min>a[k][pos_max]){ _min=a[k][pos_max]; pos_min=k; } if(i==pos_min){ cout<<pos_min<<" "<<pos_max <<" "<<a[pos_min][pos_max]; return 0; } } cout<<"not found"<<endl; return 0; }