GeeksforGeeksSolution ForHardDomain .Below You Can Find The Solution OfSchoolBasic ,Easy ,Medium. OrHackerrank SolutionYou Can Also Direct Submit Your Solution toGeeksforgeeksSame Problem .You Need to login then you can submit you answers

**Problem :-**Finding the numbers

**Submit Your Solution :-**

**Click Here**

**Solution :-**

#include<iostream>

#include<algorithm>

using namespace std;

int main()

{

long long int t,x,n,i,j,y;

cin>>t;

while(t--)

{

cin>>n;

x = 2*n+2;

long long int a[x];

for(i=0;i<x;i++)

{

cin>>a[i];

}

sort(a,a+x);

for(i=0;i<x;i=i+2)

{

y = a[i]^a[i+1];

if(y!=0)

{

cout<<a[i]<<" ";

i=i-1;

}

}

cout<<endl;

}

}

**Output:-**

## 0 Comments: