Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
145242 罗晟睿 序列变换II C++ Compile Error 0 MS 0 KB 360 2026-01-25 12:05:06

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; for (int i=0; i<n; i++) { cin >> a[i]; } int b, sum=0; cin>>b; for (int i=1; i<=b; i++) { int m; cin>>m; sum=a[m-1]; for (int y=m-1; y<n-1; y++) { a[j]=a[j+1]; } a[n-1]=t; } for (int i=0; i<n; i++) { cout <<a[i]<<" "; } return 0; }


Run Info:

Main.cc:2:1: error: stray '\357' in program
 using namespace std; 
 ^
Main.cc:2:1: error: stray '\274' in program
Main.cc:2:1: error: stray '\233' in program
Main.cc:3:1: error: expected ';' before 'int'
 int main() {
 ^
Main.cc: In function 'int main()':
Main.cc:7:10: error: 'a' was not declared in this scope
   cin >> a[i];
          ^
Main.cc:14:7: error: 'a' was not declared in this scope
   sum=a[m-1];
       ^
Main.cc:16:6: error: 'j' was not declared in this scope
    a[j]=a[j+1];
      ^
Main.cc:18:10: error: 't' was not declared in this scope
   a[n-1]=t;
          ^
Main.cc:21:10: error: 'a' was not declared in this scope
   cout <