Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
83559 揭伟琦 矩阵旋转 C++ Compile Error 0 MS 0 KB 804 2024-07-14 15:52:09

Tests(0/0):


Code:

#include<iostream> #include<cstring> using namespace std; int a[100][100]; int main(){ int n,m; cin>>n>>m;#include<iostream> #include<cstring> using namespace std; int a[100][100]; int main(){ int n,m; cin>>n>>m; for(int i=0;i<=n;i++){ for(int j=0;j<m;j++){ cin>>a[i][j]; b[i][j]=a[j][n-1-i]; } } for (int i=0;i<m;i++){ for(int j=0;j<n;j++){ cout <<b[i][j]<<' '; } cout <<' '; } return 0; } for(int i=0;i<=n;i++){ for(int j=0;j<m;j++){ cin>>a[i][j]; } } for(int j=0;j<m;j++){ for(int i=0;i<n;i++){ cout <<a[j][n-i-1]<<' '; } cout <<endl; } return 0; }


Run Info:

Main.cc:7:15: error: stray '#' in program
     cin>>n>>m;#include
               ^
Main.cc: In function 'int main()':
Main.cc:7:16: error: 'include' was not declared in this scope
     cin>>n>>m;#include
                ^
Main.cc:7:32: error: expected primary-expression before '>' token
     cin>>n>>m;#include
                                ^
Main.cc:9:1: error: expected primary-expression before 'using'
 using namespace std;    
 ^
Main.cc:11:11: error: a function-definition is not allowed here before '{' token
 int main(){
           ^
Main.cc:10:5: warning: unused variable 'a' [-Wunused-variable]
 int a[100][100];
     ^
Main.cc:42:1: error: expected '}' at end of input
 }
 ^