Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
151843 孔声豪 序列变换II C++ Accepted 1 MS 272 KB 292 2026-04-19 11:21:05

Tests(10/10):


Code:

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