Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
109266 邹昊辰 矩阵对角线 C++ Compile Error 0 MS 0 KB 382 2025-02-07 23:12:15

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int a[100][100]; int n,m,s; cin>>n>>m; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ cin>>a[i][j]; } for(int x=0;x<n;x++){ for(int w=0;w<n;w++){ //a[x][w] if(x+w==n-1||w==x){ a[n-1-w][n-1-x]+=5; a[x][x]+=5; } } cout<<a[x][w]<<" "; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:22:15: error: 'w' was not declared in this scope
    cout<