Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
117415 唐安轩 矩阵旋转 C++ Compile Error 0 MS 0 KB 365 2025-04-19 10:22:10

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespce std; int main(){ int i,j,m,n,a[105][105]; cin>>n>>m; for(i = 1;i <= n;i++){ for(j = 1;j <= m;j++){ cin>>a[i][j]; } } for(j = 1;j <= m;j++){ for(i = n;i >= 1;i--){ cout<<a[i][j]<<" "; } cout<<endl; } return 0; }


Run Info:

Main.cc:2:7: error: expected nested-name-specifier before 'namespce'
 using namespce std; 
       ^
Main.cc: In function 'int main()':
Main.cc:5:5: error: 'cin' was not declared in this scope
     cin>>n>>m; 
     ^
Main.cc:5:5: note: suggested alternative:
In file included from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:74:0,
                 from Main.cc:1:
/usr/include/c++/5/iostream:60:18: note:   'std::cin'
   extern istream cin;  /// Linked to standard input
                  ^
Main.cc:13:9: error: 'cout' was not declared in this scope
         cout<& __os)
     ^