Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
131334 郝王骏程 22插入数据 C++ Compile Error 0 MS 0 KB 623 2025-09-22 19:58:51

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 c,a[101],b,t=0; cin>>c; for(int i=0;i<=c-1;i++){ cin>>a[i]; } cin>>b; for(int i=0;i<=c-1;i++){ if(a[i]<a[i-1]&&a[i]==a[i+1]){ for(int i=0;i<n-1;i++){ t=a[i]; a[i]=a[i+1]; a[i+1]=t; } for(int i=0;i<n-1;i++){ cout<<a[i]<<" " } } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:16:23: error: 'n' was not declared in this scope
         for(int i=0;i