Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
6787 | 柯宇希 | 计算鞍点 | C++ | Compile Error | 0 MS | 0 KB | 956 | 2025-03-15 16:03:16 |
#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<=n;k++){ if(mymin>a[k][y]){ mymin=a[k][y]; x=k } } if(mymax==mymin){ cout<<x<<" "<<y<<" "<<a[x][y]; f=ture; } } if(mymax!=mymin) cout<<"not found"; return 0; }
Main.cc: In function 'int main()': Main.cc:18:9: error: expected ';' before 'for' for(int j=2;j<=5;j++){ ^ Main.cc:18:21: error: 'j' was not declared in this scope for(int j=2;j<=5;j++){ ^ Main.cc:18:29: error: expected ';' before ')' token for(int j=2;j<=5;j++){ ^ Main.cc:39:1: error: expected '}' at end of input } ^ Main.cc:8:25: warning: unused variable 'mymin' [-Wunused-variable] int a[10][10],mymax,mymin,x,y; ^ Main.cc:8:31: warning: unused variable 'x' [-Wunused-variable] int a[10][10],mymax,mymin,x,y; ^ Main.cc:9:10: warning: unused variable 'f' [-Wunused-variable] bool f=false; ^ Main.cc:39:1: error: expected '}' at end of input } ^