A62499. 阅读C++程序填写结果:#include<bits/stdc++.h>
编程题
知识点
题目描述
阅读C++程序填写结果:
#include<bits/stdc++.h>
using namespace std;
const int maxn=100 + 7;
int p1[maxn],p2[maxn];
int main()
{
int n; scanf("%d",&n);
for(int i= 1;i<= n; ++i){
scanf("%d",&p1[i]);
}
for(int i =1; i <= n; ++i){
p2[i]= p1[p1[i]];
}
for(int i=1;i<= n; ++i){
cout<<p2[i]<<" ";
}
cout<<"\n";
return 0;
}