| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 134309 | 林睿 | 矩阵转置 | C++ | Compile Error | 0 MS | 0 KB | 421 | 2025-10-26 17:12:01 |
#include<bits/stdc++.h> using namespace std; int main(){ int a[n][m],b[m][n]; for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ cin>>a[i][j]; } } for(int i=0;i<m;i++){ for(int j=0;j<n;j++){ b[i][j]=a[j][i]; } } for(int i=0;i<m;i++){ for(int j=0;j<n;j++){ cout<<b[i][j]<<" "; } cout<<" "<<endl; } }
Main.cc: In function 'int main()':
Main.cc:4:11: error: 'n' was not declared in this scope
int a[n][m],b[m][n];
^
Main.cc:4:14: error: 'm' was not declared in this scope
int a[n][m],b[m][n];
^
Main.cc:7:18: error: 'a' was not declared in this scope
cin>>a[i][j];
^
Main.cc:12:13: error: 'b' was not declared in this scope
b[i][j]=a[j][i];
^
Main.cc:12:21: error: 'a' was not declared in this scope
b[i][j]=a[j][i];
^
Main.cc:17:19: error: 'b' was not declared in this scope
cout<