Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
107657 | 殷佳雨萱 | 19按规则查找数组中的数据 | C++ | Compile Error | 0 MS | 0 KB | 249 | 2025-01-18 11:07:33 |
#include<iostream> using namespace std; int p[1000]; int main(){ int n,m; cin>>n>>m; for(int i=1;i<=n;i++){ cin>>p[i]; } int t; t=a[1]; for(int i=2;i<=m;i++){ cout<<t<<" "; t = a[t]; } cout<<t<<endl; return 0; }
Main.cc: In function 'int main()': Main.cc:11:4: error: 'a' was not declared in this scope t=a[1]; ^