Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
113949 郝王骏程 计算鞍点 C++ Compile Error 0 MS 0 KB 944 2025-03-17 20:53:36

Tests(0/0):


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[6][6],max,maxj,min,minj; 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++;){ max=0,min=999; for(int j=1;j<=5;j++;){ if(a[i][j]>max){ max=a[i][j]; maxj=j; } } for(int i=1;i<=5;i++;){ if(a[j][minj]>min){ min=a[j][minj]; minj=j; } } if(min=max){ cout<<minj<<" "<<maxj<<" "<<max; } else cout<<"not found"; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:9:33: error: expected ')' before ';' token
             for(int i=1;i<=5;i++;){
                                 ^
Main.cc:9:34: error: expected primary-expression before ')' token
             for(int i=1;i<=5;i++;){
                                  ^
Main.cc:15:29: error: expected ')' before ';' token
         for(int i=1;i<=5;i++;){
                             ^
Main.cc:15:30: error: expected primary-expression before ')' token
         for(int i=1;i<=5;i++;){
                              ^
Main.cc:8:9: warning: unused variable 'a' [-Wunused-variable]
     int a[6][6],max,maxj,min,minj;
         ^
Main.cc:8:17: warning: unused variable 'max' [-Wunused-variable]
     int a[6][6],max,maxj,min,minj;
                 ^
Main.cc:8:21: warning: unused variable 'maxj' [-Wunused-variable]
     int a[6][6],max,maxj,min,minj;
                     ^
Main.cc:8:26: warning: unused variable 'min' [-Wunused-variable]
     int a[6][6],max,maxj,min,minj;
                          ^
Main.cc:8:30: warning: unused variable 'minj' [-Wunused-variable]
     int a[6][6],max,maxj,min,minj;
                              ^