| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 64634 | 黎瑾萱 | 二维数组的最大值与最小值 | C++ | Compile Error | 0 MS | 0 KB | 420 | 2024-01-21 17:21:10 |
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int a[n][n]; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ cin>>a[i][j]; } } int max=1,mbx=9; for(int m=0;m<n;m++){ for(int b=0;b<n;b++){ if(a[m][b]<max){ max = a[m][b]; } else if(a[k][c]>mbx){ mbx = a[k][c]; } else{ continue; } } } cout<<max<<" "<<mbx<<endl; return 0; }
Main.cc: In function 'int main()':
Main.cc:18:14: error: 'k' was not declared in this scope
else if(a[k][c]>mbx){
^
Main.cc:18:17: error: 'c' was not declared in this scope
else if(a[k][c]>mbx){
^