Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
130670 胥博雯 序列变换II C++ Compile Error 0 MS 0 KB 532 2025-09-14 16:21:25

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:17:13: error: 'i' was not declared in this scope
         for(i=0;i