2 条题解

  • 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

      信息

      ID
      390
      时间
      1000ms
      内存
      64MiB
      难度
      5
      标签
      递交数
      19
      已通过
      14
      上传者