Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
100017 张永良 序列变换II C++ Accepted 1 MS 272 KB 298 2024-12-01 14:01:09

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int n,t,f,h; cin>>n; int a[n],s[n]; for(int i=0;i<=n-1;i++){ cin>>a[i]; } for(int i=0;i<=n-1;i++){ t=a[i]; f=a[t-1]; h=a[f-1]; s[i]=h; } for(int i=0;i<=n-1;i++){ cout<<s[i]<<" "; } return 0 ; }