60ptsTLE了
查看原帖
60ptsTLE了
703319
Sylvia_starx楼主2023/6/29 14:55

60分,其余TLE

#include<bits/stdc++.h>
using namespace std;
unsigned long long n,x,t;
unordered_map<unsigned long long,bool> mp;
int main()
{
	std::ios::sync_with_stdio(false);
	cin>>t;
	while(t--)
	{
		cin>>n;
		mp.clear();
		for(int i=1;i<=n;i++)
		{
			cin>>x;
			if(mp[x] == 0)
			{
				cout<<x<<" ";
				mp[x] = 1;
			}
		}
		cout<<"\n";
	}
	return 0;
}
2023/6/29 14:55
加载中...