Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
93928 只因你太美(Ikun 真爱粉) 22数列变换III C++ Wrong Answer 0 MS 268 KB 710 2024-10-19 15:46:31

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() #include<string> using namespace std; int main(){ int n,bb,ma=0; cin>>n; int a[n],b[n]; for(int i=0;i<n;i++){ cin>>a[i]; } int k; cin>>k; for(int i=0;i<k;i++){ cin>>bb; for(int j=0;j<bb;j++){ if(a[j]==0){ma++;} } b[i]=a[ma]; a[ma]=0; } for(int i=0;i<n-k;i++){ cout<<a[i]<<" "; } for(int i=0;i<k;i++){ cout<<b[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-----
0 0 3 0 5 6 1 2 4 7