Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
6641 | 张育斌 | 矩阵右移动 | C++ | Compile Error | 0 MS | 0 KB | 672 | 2025-03-08 15:46:22 |
#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 n,m,a[10][10]; cin>>m>>n; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ cin>>a[i][j]; if(j+m>n-1){ b[i][j+m]=a[i][j]; } else b[i][j+m]=a[i][j]; } } for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ cout<<b[i][j]<<" "; } cout<<endl; } return 0; }
Main.cc: In function 'int main()': Main.cc:14:17: error: 'b' was not declared in this scope b[i][j+m]=a[i][j]; ^ Main.cc:17:17: error: 'b' was not declared in this scope b[i][j+m]=a[i][j]; ^ Main.cc:22:19: error: 'b' was not declared in this scope cout<b[i][j]<<" "; ^