Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
6748 | 刘芃伽 | 序列变换II | C++ | Wrong Answer | 0 MS | 264 KB | 451 | 2025-03-15 10:15:04 |
#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 a[101],n; cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; } int t; for(int i=1;i<=n;i++){ t=a[i]; cout<<a[a[a[t]]]<<' '; } return 0; }
------Input------
36 21 36 12 20 6 2 3 21 9 24 20 26 8 9 26 21 5 35 28 23 2 14 8 8 17 23 36 11 16 1 9 13 4 22 6 6
------Answer-----
36 2 23 8 36 6 26 36 9 21 8 8 2 9 8 36 2 2 20 21 6 9 2 2 6 21 2 23 2 2 9 21 23 9 36 36
------Your output-----
6 36 8 21 6 2 23 6 9 2 21 21 36 9 21 6 36 36 23 2 2 9 36 36 2 2 36 8 36 36 9 2 8 9 6 6