Cod sursa(job #1463042)

Utilizator vladrochianVlad Rochian vladrochian Data 19 iulie 2015 19:03:17
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.38 kb
#include <fstream>
using namespace std;

ifstream fin("xerox.in");
ofstream fout("xerox.out");

void GetLine(int &x) {
	fin >> x;
	fin.ignore(10000, '\n');
}

void Test() {
	int N, sum = 0;
	GetLine(N);
	while (N--) {
		int x;
		GetLine(x);
		sum ^= x;
	}
	fout << (int)(sum != 0) << "\n";
}

int main() {
	int T;
	fin >> T;
	while (T--)
		Test();
	return 0;
}