View Code of Problem 3929

#include<iostream>
using namespace std;
int main() {
	int T, n,sum;
	cin>>T;
	while(T--) {
		cin>>n;
		sum=0;
		int arr[100000]={0},count2[100000]={0};
		for(int i=0; i<n; i++) cin>>arr[i];
		for(int i=0; i<n; i++) sum^=arr[i];
		cout<<sum<<endl;
	}
}

Double click to view unformatted code.


Back to problem 3929