Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
127681 董予轩 对角线之和 C++ Compile Error 0 MS 0 KB 270 2025-07-28 16:30:36

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int a[101][101],b[101][101],n,sum=0; cin>>n>>m; for(int i=1;i<=n;i++) for(int j=1;j<=n;j++) { cin>>a[i][j]; if(i==j || i+j==n+1) sum+=a[i][j]; } cout<<a[i][j]; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:10: error: 'm' was not declared in this scope
  cin>>n>>m;
          ^
Main.cc:14:10: error: 'i' was not declared in this scope
  cout<