| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 73254 | 石依灵 | 19按规则查找数组中的数据 | C++ | Accepted | 1 MS | 276 KB | 308 | 2024-05-18 14:01:27 |
#include<iostream> using namespace std; int e[1000]; int main(){ int n,m; int a,b; cin>>n>>m; for(int i=1;i<=n;i++){ cin>>e[i]; } a=e[1]; cout<<a; for(int i=1;i<m;i++){ b=e[a]; a=b; cout<<' '<<b; } return 0; }