1 条题解

  • 0
    @ 2022-12-10 10:08:02
    #include <bits/stdc++.h>
    using namespace std;
    int n, m, x, y;
    int a[21234];
    int main()
    {
        cin >> n;
        for (int i = 1; i <= n; i++)
            cin >> a[i];
        cin >> m;
        for (int t = 1; t <= m; t++)
        {
            cin >> x;
            for (int i = x + 1; i <= n; i++)
                a[i - 1] = a[i];
            n--;
        }
        for (int i = 1; i <= n; i++)
            cout << a[i] << " ";
        return 0;
    }
    
    • 1

    信息

    ID
    1081
    时间
    1000ms
    内存
    256MiB
    难度
    3
    标签
    递交数
    124
    已通过
    68
    上传者