Help me in solving MISSP problem

My issue

My code

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	return 0;
}

Problem Link: MISSP Problem - CodeChef

include <bits/stdc++.h>

using namespace std;
int main()
{ int t;
cin>>t;
while(t–){
int n;
cin>>n;
int a[n];
for(int i=0;i<n;++i){
cin>>a[i];
}
int x=0;
for(int i=0;i<n;++i){
x=x^a[i];
}
cout<<x<<endl;
}
}