1 solutions

  • 0
    @ 2026-11-15 12:29:54

    C++ :

    #include <bits/stdc++.h>
    #define N 100005
    using namespace std;
    int a[N];
    int main(){
        int n,m,x;
        cin >> n >> m;
        
        for (int i =1;i<=m;i++){
            cin >> x;
            a[x] = 1;
        }
        
        for (int i = 1;i<=n;i++){
            if (!a[i]) cout << i << endl;
        }
        
        return 0;
    }
    
    • 1

    Information

    ID
    181
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By