Cod sursa(job #1616000)

Utilizator TeodorCotetCotet Teodor TeodorCotet Data 27 februarie 2016 00:37:11
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.44 kb
#include <bits/stdc++.h>

using namespace std;

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

int t; int n;

int main() {

	fin >> t ;

	while(t--) {

		int bullshit ; int resXor = 0;

		fin >> n >> bullshit >> bullshit;

		while(n--) {

			int x;
			fin >> x;

			resXor = resXor xor x;

			while(x--) fin >> bullshit >> bullshit;
		}

		(resXor == 0) ? fout << 0 << '\n' : fout << 1 << '\n';
	}

	return 0;
}