Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
2341 | 吴奕希 | 序列变换 | C++ | Wrong Answer | 0 MS | 264 KB | 373 | 2023-12-23 18:44:42 |
# include<iostream> using namespace std; int main() { int n,m; cin>>n; int lst[n]; for(int i = 0; i < n; i++) { cin>>lst[i]; } for(int i = 0; i < n; i++) { m = lst[i]; lst[i] = lst[lst[i]-1]; lst[lst[i]-1] = m; } for(int i = 0; i < n; i++) { cout<<lst[i]<<" "; } }
------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-----
2 6 26 23 2 36 12 2 9 8 23 23 21 9 23 2 6 6 11 8 36 9 21 21 5 8 6 20 21 21 9 8 20 14 2 2
------Your output-----
2 1 26 23 2 36 26 24 22 8 28 3 24 9 3 2 2 6 11 23 5 9 4 13 2 3 6 11 2 2 14 24 23 9 36 6