Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
118446 | 徐毅然 | 外围元素之和 | C++ | Compile Error | 0 MS | 0 KB | 243 | 2025-05-03 08:42:22 |
#include<bits/stdc++.h> using namespace std; int main(){ int sum=0; for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ if(i==0||i=n-1){ sum=sum+a[i][j]; }else{ if(j==0||j==m-i){ sum=sum+a[i][j]; } } } }
Main.cc: In function 'int main()': Main.cc:5:15: error: 'n' was not declared in this scope for(int i=0;i