Cod sursa(job #642509)

Utilizator zalmanDanci Emanuel Sebastian zalman Data 1 decembrie 2011 16:14:38
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.4 kb
#include <fstream>
using namespace std;

int T, N, M, x, y, win;
ifstream f("xerox.in");
ofstream g("xerox.out");
	
int main(void)
{
	f >> T;
	while(T--)
	{
		f >> N >> x >> y;
		win = 0;
		for(int i = 1; i <= N; ++i)
		{
			f >> M;
			win = win ^ M;
			
			for(int j = 1; j <= M; ++j)
				f >> x >> y;
		}
		g << (win > 0) << "\n";
	}
	
	f.close();
	g.close();
	
	return 0;
}