Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
128335 吴雨卓 序列变换 C++ Compile Error 0 MS 0 KB 206 2025-08-15 09:00:51

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a[101],b[101]; for(int i=1;i<=n;i++){ cin>>a[i]; }for(int i=1;i<=n;i++){ b[i]=a[a[i]]; }for(int i=1;i<=n;i++){ cout<<b[i]<<" "; } }


Run Info:

Main.cc: In function 'int main()':
Main.cc:5:16: error: 'n' was not declared in this scope
 for(int i=1;i<=n;i++){
                ^
Main.cc:7:17: error: 'n' was not declared in this scope
 }for(int i=1;i<=n;i++){
                 ^
Main.cc:9:17: error: 'n' was not declared in this scope
 }for(int i=1;i<=n;i++){
                 ^