2 solutions

  • 1
    @ 2025-7-13 15:22:50

    #include <bits/stdc++.h> using namespace std;

    int main() { int n, m, a[100005], x; cin >> n >> m; for (int i = 1; i <= n; i++) { cin >> x; a[x]++; } for (int j = 1; j <= n; j++) { if (a[j] == 0) { cout << j << endl; } } return 0; }

    • 0
      @ 2025-7-13 15:23:20

      #include <bits/stdc++.h> using namespace std;

      int main() { int n, m, a[100005], x; cin >> n >> m; for (int i = 1; i <= n; i++) { cin >> x; a[x]++; } for (int j = 1; j <= n; j++) { if (a[j] == 0) cout << j << endl; }

      return 0;
      

      }

      • 1

      Information

      ID
      390
      Time
      1000ms
      Memory
      64MiB
      Difficulty
      5
      Tags
      # Submissions
      19
      Accepted
      14
      Uploaded By