60pts超时求条
查看原帖
60pts超时求条
1342104
goodzsq楼主2025/8/29 23:01
#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    unordered_map<int, bool> a;
    for (int i = 0; i < n; ++i) {
      int num;
      cin >> num;
      if (a.find(num) == a.end()){
        cout << num << " ";
        a[num] = true;
      }
    }
    cout << endl;
  }
  return 0;
}
2025/8/29 23:01
加载中...