Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
6789 | 柯宇希 | 计算鞍点 | C++ | Wrong Answer | 0 MS | 264 KB | 956 | 2025-03-15 16:07:52 |
#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,n; 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[i][y]; x=1; for(int k=2;k<=n;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; }
------Input------
16 8 13 2 24 11 3 20 5 22 17 9 7 14 12 10 1 4 18 6 19 21 23 25 15
------Answer-----
not found
------Your output-----
1 5 241 5 241 1 161 4 21 4 2