Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
157306 余建成 计算鞍点 C++ Compile Error 0 MS 0 KB 495 2026-07-22 13:31:13

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ int a[5][5]={},flag=0,max=0,min,l,h; 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=1000; for(int j=1;j<=5,j++){ if(max<a[i][j]){ max=a[i][j]; l=j; } } for(int k=1;k<=5;k++){ if(min>a[k][l]){ min=a[k][l]; h=k; } } if(max==min)break; } if(min==max)cout<<h<<' '<<l<<' '<<min<<endl; else cout<<"not found"<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:10:16: warning: left operand of comma operator has no effect [-Wunused-value]
   for(int j=1;j<=5,j++){
                ^
Main.cc:10:23: error: expected ';' before ')' token
   for(int j=1;j<=5,j++){
                       ^
Main.cc:4:17: warning: unused variable 'flag' [-Wunused-variable]
  int a[5][5]={},flag=0,max=0,min,l,h;
                 ^