Cod sursa(job #1475466)

Utilizator tamionvTamio Vesa Nakajima tamionv Data 24 august 2015 08:55:19
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.35 kb
#include <fstream>
using namespace std;

int main(){
	ifstream f("xerox.in");
	ofstream g("xerox.out");
	int t = 0;
	f >> t;
	for(int i = 0, n, lost; i < t; ++i){
		int rez = 0;
		f >> n >> lost >> lost;
		for(int j = 0, m; j < n; ++j){
			f >> m;
			for(int k = 0; k < m; ++k){
				f >> lost >> lost; }
			rez ^= m; }
		g << (bool)rez << '\n'; }
	return 0; }