Cod sursa(job #837604)

Utilizator AndreiRSStatescu Andrei Rares AndreiRS Data 18 decembrie 2012 11:42:31
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.45 kb
#include <fstream>
#include <algorithm>
#include <vector>
#include <math.h>
#include <stdlib.h>
using namespace std;
 
ifstream fi ("xerox.in");
ofstream fo ("xerox.out");

int T, N, M, S;

int main ()
{
	int x, y;
	fi >> T;
	while (T --)
	{
		fi >> N >> x >> y;
		S = 0;
		while (N --)
		{
			fi >> M;
			S ^= M;
			
			while (M --)
				fi >> x >> y;			
		}
		if (S == 0)
			fo << "0\n";
		else
			fo << "1\n";
	}
    return 0;
}