Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
133567 唐诗阳 计算鞍点 C++ Compile Error 0 MS 0 KB 876 2025-10-19 16:04:32

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=0,min=100000,max_i,h,l; 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=-1; for(int j=1;j<=5;j++){ if(a[i][j]>max){ max=a[i][j]; h=i } } min=100000 for(int j=1;j<=5;j++){ if(a[j][h]<min){ min=a[j][h]; l=j; } } if(max==min){ cout<<l<<' '<<h<<' '<<max;return 0; } } cout<<"not found"; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:20:13: error: expected ';' before '}' token
             }
             ^
Main.cc:23:9: error: expected ';' before 'for'
         for(int j=1;j<=5;j++){
         ^
Main.cc:23:21: error: 'j' was not declared in this scope
         for(int j=1;j<=5;j++){
                     ^
Main.cc:8:34: warning: unused variable 'max_i' [-Wunused-variable]
     int a[6][6],max=0,min=100000,max_i,h,l;
                                  ^