悬赏关注,tle后4个
查看原帖
悬赏关注,tle后4个
881471
RanHT楼主2023/7/12 23:38
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int dx[8]={-1,0,1,0};
int dy[8]={0,1,0,-1};
const int N=10,mod=80112002;
string s,ss,sss;
char cz;
int  len,m,a,b,c,d,k,x,y,w[N],f[N],n,o,p,
dp[10],dis[N],bj[1],h[N],ne[N],e[N];
ll idx;
int res,ans,num;
vector<int>v,v1;
typedef pair<string,string> pp;
queue<pp>q;
map<ll,ll>mp;
void add(int a,int b,int c)
{
	w[idx]=c;
	e[idx]=b;
	ne[idx]=h[a];
	h[a]=idx++;
}
int main()
{
	ios::sync_with_stdio(false);
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	cin>>n;
	for(int j=1;j<=n;j++){
		cin>>m;
		for(int i=1;i<=m;i++){
			cin>>a;
			if(mp[a]!=j){
				v.push_back(a);
				mp[a]=j;
			}
		}
		for(auto i:v){
			cout<<i<<' ';
		}
		cout<<"\n";
		v.clear();
	}
	return 0;	
}

2023/7/12 23:38
加载中...