哈希60pts TLE求调 壶关
查看原帖
哈希60pts TLE求调 壶关
1618096
wdr2024楼主2025/7/24 11:35
#include <bits/stdc++.h>
using namespace std;
#define int unsigned long long
signed main(){
	int T;
	cin >> T;
	while(T--){
		map <int,bool> mp;
		int n;
		cin >> n;
		for(int i=1;i<=n;i++){
			int x;
			cin >> x;
			if(!mp[x]){
				cout << x << ' ';
				mp[x]=true;
			}
		}
		cout << endl;
	}
	return 0;
}

2025/7/24 11:35
加载中...