| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 64154 | 张江鹏 | 对角线之和 | C++ | Compile Error | 0 MS | 0 KB | 359 | 2024-01-20 17:37:50 |
#include<bits/stdc++.h> using namespace std; int main(){ long long x,y; cin>>x; double a[x][y],b[x][y]; long long min=0; for(int i=0;i<x;i++){ for(int j=0;j<x;j++){ cin>>a[i][j]; } } int max=0; for(int i=0;i<x;i++){ for(int j=0;j<y;j++){ if(i==j||i+j==n-1){ max+=a[i][j]; } } } cout<<max; return 0; }
Main.cc: In function 'int main()':
Main.cc:17:18: error: 'n' was not declared in this scope
if(i==j||i+j==n-1){
^
Main.cc:7:17: warning: unused variable 'b' [-Wunused-variable]
double a[x][y],b[x][y];
^
Main.cc:8:12: warning: unused variable 'min' [-Wunused-variable]
long long min=0;
^