全部评论 3

  • 我不知道,可能有特判吧??

    2025-12-17 来自 上海

    1
  • 应该是测试点错了

    2025-06-08 来自 广东

    1
  • 是不是第四个测试点
    第四个测试点洛谷过得了但acgo过不了
    已举报

    2026-01-28 来自 湖南

    0
    • 啊?我过了:
      #include <bits/stdc++.h>
      using namespace std;

      int main() {
      int n, m, d;
      cin >> n >> m;
      int a[1000] = {0}; //0表示未到达,1表示已到达
      for (int i = 0; i < m; i++) {
      cin >> d;
      a[d] = 1;
      }
      bool is = 0;
      for (int i = 0; i < n; i++) {
      if (a[i] == 0) {
      is = 1;
      cout << i << " ";
      }
      }
      if (is == 0) {
      cout << n;
      }
      return 0;
      }
      ??????

      1周前 来自 江苏

      1
    • 我的是:
      #include <iostream>
      #include <vector>
      using namespace std;
      int main() {
      int N, M;
      cin >> N >> M;
      vector<bool> arrived(N, false);
      int count_arrived = 0;
      for (int i = 0; i < M; i++) {
      int num;
      cin >> num;
      if (!arrived[num]) {
      arrived[num] = true;
      count_arrived++;
      }
      }
      if (count_arrived == N) {
      cout << N << endl;
      } else {
      bool is_first = true;
      for (int i = 0; i < N; i++) {
      if (!arrived[i]) {
      if (!is_first) {
      cout << " ";
      }
      cout << i;
      is_first = false;
      }
      }
      cout << endl;
      }
      return 0;
      }

      1周前 来自 湖南

      0

热门讨论