1 solutions

  • 0
    @ 2023-12-10 12:30:40
    #include<stdio.h>
    int main(){
        int n,a[30000],m,x;
        scanf("%d",&n);
        for(int i=1;i<=n;i++){
            scanf("%d",&a[i]);
        }
        scanf("%d",&m);
        while(m--){
            scanf("%d",&x);
            for(int i=x;i<=n;i++){
                a[i]=a[i+1];
            }
            n--;
        }
        for(int i=1;i<=n;i++){
            printf("%d ",a[i]);
        }
        return 0;
    }
    
    • 1

    Information

    ID
    6794
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    7
    Tags
    # Submissions
    148
    Accepted
    33
    Uploaded By