Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
100339 欧阳俊懿 序列变换II C++ Compile Error 0 MS 0 KB 553 2024-12-07 16:00:36

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(){ int n; cin>>n; int a[n]; int t1,t2; for(int i=0;i<n;i++) { cin>>a[i]; } for(int i=0;i<n;i++) { t1=a[i]; t2=a[t1-1]; b[i]=a[t2-1]; } for(int i=0;i<n;i++) { cout<<b[i]<<" "; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:20:9: error: 'b' was not declared in this scope
         b[i]=a[t2-1];
         ^
Main.cc:24:15: error: 'b' was not declared in this scope
         cout<