2 条题解

  • 1
    @ 2025-7-14 17:09:25

    #include<bits/stdc++.h> using namespace std; int main() { int t[100001],n,x; cin>>n; for(int i=0;i<n;i++) { cin>>x; if(t[x]==0) cout<<x<<" "; t[x]=1; } return 0; }

    • 1
      @ 2025-7-14 17:06:35
      using namespace std;
      int main()
      {
          int n, x;
          cin >> n;
          int t[100001];
          for(int i = 0; i < n; i++)
          {
              cin >> x;
              if(t[x] == 0) cout << x << " ";
              t[x] = 1;
          }
          return 0;
      }
      
      
      
      • 1

      信息

      ID
      273
      时间
      1000ms
      内存
      256MiB
      难度
      7
      标签
      递交数
      35
      已通过
      9
      上传者