Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
107109 糜宗易 18高度为k的树 C++ Output Limit Exceeded 2 MS 304 KB 594 2025-01-17 13:01:27

Tests(0/10):


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 n,m; cin>>n; int a[n]; int man2=0,man3=0; for(int z=0;z<n;z++){ cin>>a[z]; } cin>>m; for(int i=m;i<n-1;i++) { a[i-1]=a[i]; } a[n]=0; for(int k=1;k<n-1;k++) cout<<a[k]<<" "; cout<<a[n-1]<<endl; return 0; }