Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
114524 李昊宇 19按规则查找数组中的数据 C++ Compile Error 0 MS 0 KB 271 2025-03-22 14:41:44

Tests(0/0):


Code:

#include<iostream> using namespace std; int a[1000]; int main(){ int n,m; cin>>n>>m; for(int i=1;i<=n;i++){ cin>>a[i]; } for(int j=1;j<=m;j++){ cout<<a[i]<<" "; cout<<a[a[i]]<<endl; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:11:17: error: 'i' was not declared in this scope
         cout<