2 条题解
-
0
#include <bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int T; cin>>T; while(T--){ int n; cin>>n; unordered_set seen; bool first=true; for(int i=0;i<n;i++){ int x; cin>>x; if(seen.insert(x).second){ if(!first) cout<<' '; cout<<x; first=false; } } cout<<'\n'; } return 0; }
信息
- ID
- 4968
- 时间
- 2000ms
- 内存
- 256MiB
- 难度
- 10
- 标签
- 递交数
- 1
- 已通过
- 1
- 上传者
粤公网安备44195502000195号