Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
113551 李朋秦 18插队喝水 C++ Compile Error 0 MS 0 KB 513 2025-03-16 09:34:08

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int s[b],b,n; cin>>n; for(int i=1;i<n;i++){ cin>>a[i]; } a[b]=a[n+1]; for(int i=1;i<=n;i--){ a[i+1]=a[i]; } for(int i=1;n-1;i++){ cout<<a[i]<<endl; } cout<<a[i]<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:8:11: error: 'b' was not declared in this scope
     int s[b],b,n;
           ^
Main.cc:11:14: error: 'a' was not declared in this scope
         cin>>a[i];
              ^
Main.cc:13:5: error: 'a' was not declared in this scope
     a[b]=a[n+1];
     ^
Main.cc:20:13: error: 'i' was not declared in this scope
     cout<