View Code of Problem 3929

#include<iostream>

using namespace std;

int main() {
int T;
	cin >> T;
	while (T--) {
		int n; cin >> n; int m = n;
		int arr[n];
		while (n--)
			scanf("%d", &arr[n]);
		int result = arr[0];
		for (int i = 1; i < m; i++) 
			result ^= arr[i];
		cout << result << endl;
	}
}

Double click to view unformatted code.


Back to problem 3929