Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
92606 董林泽 22数列变换III C++ Wrong Answer 1 MS 272 KB 670 2024-10-05 17:58:45

Tests(0/2):


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,k; cin>>n; int a[105]; for(int i=1;i<=n;i++) { cin>>a[i]; } cin>>k; int b[100]; int t; for(int i=1;i<=k;i++) { cin>>b[i]; a[n]=a[b[i]]; for(int j=b[i];j<n;j++) { a[j]=a[j+1]; } } for(int i=1;i<n;i++) { cout<<a[i]<<" "; } return 0; }


Run Info:

------Input------
10 1 2 3 4 5 6 7 8 9 10 4 4 3 2 5
------Answer-----
1 5 6 7 9 10 4 3 2 8
------Your output-----
1 5 6 7 9 4 3 2 8