Cod sursa(job #1072697)

Utilizator veleanduAlex Velea veleandu Data 4 ianuarie 2014 19:34:10
Problema Xerox Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.33 kb
#include <fstream>
#include <iostream>
using namespace std;
int main() {
	ifstream in("xerox.in");
	ofstream out("xerox.out");
 	int T;
	in >> T;
	while (T--) {
		int n, rez = 0;
		in >> n;
		int a, b, el;
		in >> a >> b;
		while (n--) {
			in >> el;
			rez ^= el;
			in >> a >> b;
		}
		out << ((rez != 0)?(1):(0)) << '\n';
	}
	return 0;
}