Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
113537 | 陈奕涵 | 18插队喝水 | C++ | Runtime Error | 0 MS | 272 KB | 500 | 2025-03-16 09:20:08 |
#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 n,x,a[100]; cin>>n; for(int i=0;i<n;i++){ cin>>a[i]; } cin>>x; for(int p=n;p>x;p++){ a[p+1]=a[p]; } a[x]=a[n+1]; for(int j=0;j<n+1;j++){ cout<<a[j]; } return 0; }
Runtime Error:Segmentation fault