Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
105244 | 吴诗涵 | 矩阵对角线 | C++ | Compile Error | 0 MS | 0 KB | 682 | 2025-01-12 18:48:47 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int m,n; cin>>n>>m; int a[105][105],b=0,c=m; for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ cin>>a[i][j]; } } for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ if(j==b){ a[i][j]+=10; } else if(j==c){ a[i][j]+=10; } } for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ cout<<a[i][j]<<" "; } cout<<endl; } return 0; }
Main.cc: In function 'int main()': Main.cc:32:1: error: expected '}' at end of input } ^