Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
121826 毛靖平 二维数组的最大值与最小值 C++ Compile Error 0 MS 0 KB 464 2025-06-08 15:04:52

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a,r=1000,h=0; cin>>a; int b[a][a]; m for(int i=0;i<a;i++){ for(int j=0;j<a;j++) cin>>b[i][j]; } for(int i=0;i<a;i++){ for(int j=0;j<a;j++){ if(b[i][j]<r){ r=b[i][j]; } } } for(int i=0;i<a;i++){ for(int j=0;j<3;j++){ if(b[i][j]>h){ h=b[i][j]; } } } cout<<r<<" "<<h; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:33: error: 'm' was not declared in this scope
  int b[a][a];                   m
                                 ^
Main.cc:7:17: error: 'i' was not declared in this scope
     for(int i=0;i