Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
95671 王珠潏 18离开队伍后的人 C++ Compile Error 0 MS 0 KB 312 2024-11-01 19:15:07

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:4:16: error: 'n' was not declared in this scope
     int a[101];n,m,s; 
                ^
Main.cc:4:18: error: 'm' was not declared in this scope
     int a[101];n,m,s; 
                  ^
Main.cc:4:20: error: 's' was not declared in this scope
     int a[101];n,m,s; 
                    ^