View Code of Problem 3929

#include<cstdio>
#include<cstring>
#include<stdio.h>
#include<cmath>
#include<iostream>
#include<algorithm>
#define N 100
using namespace std;
int ismatch(char a,char b){
	if(a=='('&&b==')'){
		return 1;
	}else if(a=='['&&b==']'){
		return 1;
	}else if(a=='{'&&b=='}'){
		return 1;
	}else{
		return 0;
	}
}
int main()
{
	int t;
	cin>>t;
	while(t--){
		int x;
		cin>>x;
		int a[100000];
		int sum=0;
		for(int  i=0;i<x;i++){
			cin>>a[i];
			sum=sum^a[i];
		}
		cout<<sum<<endl;
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 3929