| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 159395 | 张晓冉 | 二维数组最大值 | C++ | Compile Error | 0 MS | 0 KB | 471 | 2026-08-29 15:06:05 |
#include<bits/stdc++.h> using namespace std; int main(){ int a[101][101]; for(int k = 0;k < 2;k++){ for(int i = 0;i < n;i++){ for(int j = 0;j < n;j++){ cin>>a[i][j]; } } } int s = a[0][0]; for(int k = 0;k < 2;k++){ for(int i = 0;i < n;i++){ for(int j = 0;j < n;j++){ if(a[i][j] > s){ s = a[i][j]; } } } } cout<<s<<endl; }
Main.cc: In function 'int main()':
Main.cc:6:24: error: 'n' was not declared in this scope
for(int i = 0;i < n;i++){
^
Main.cc:14:24: error: 'n' was not declared in this scope
for(int i = 0;i < n;i++){
^