Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
100340 罗迎甲 序列变换II C++ Compile Error 0 MS 0 KB 1234 2024-12-07 16:00:48

Tests(0/0):


Code:

#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(){ double maxz; int n,man1,man2,minm=100; int a[n]; int s[100]={0}; cin>>n; for(int z=0;z<n;z++){ cin>>a[z]; } for(int z=0;z<n;z++){ man1=a[z]; man2=a[man1-1]; s[z]=a[man2-1]; } for(int z=0;z<n;z++){ cout<<b[z]; } return 0; }#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(){ double maxz; int n,man1,man2,minm=100; int a[n]; int s[100]={0}; cin>>n; for(int z=0;z<n;z++){ cin>>a[z]; } for(int z=0;z<n;z++){ man1=a[z]; man2=a[man1-1]; s[z]=a[man2-1]; } for(int z=0;z<n;z++){ cout<<b[z]; } return 0; }


Run Info:

Main.cc:28:2: error: stray '#' in program
 }#include  // cin\cout\endl
  ^
Main.cc: In function 'int main()':
Main.cc:25:17: error: 'b' was not declared in this scope
           cout<  // cin\cout\endl
   ^
Main.cc: In function 'int main()':
Main.cc:34:5: error: redefinition of 'int main()'
 int main(){
     ^
Main.cc:7:5: note: 'int main()' previously defined here
 int main(){
     ^
Main.cc:52:17: error: 'b' was not declared in this scope
           cout<