Cod sursa(job #126356)

Utilizator fireatmyselfBogdan-Alexandru Stoica fireatmyself Data 21 ianuarie 2008 22:14:28
Problema Xerox Scor 100
Compilator c Status done
Runda Arhiva de probleme Marime 0.4 kb
#include <stdio.h>


int n, m, x, y, i, j, g, _case;

int main()
{
	freopen("xerox.in", "r", stdin);
	freopen("xerox.out", "w", stdout);
	scanf("%d", &_case);
	while (_case--)
	{
		scanf("%d%d%d", &n, &x, &y);
		for (i = g = 0; i < n; i++)
		{
			scanf("%d", &m);
			g ^= m;
			for (j = 0; j< m; j++) scanf("%d%d", &x, &y);
		}
		if (g) printf("1\n");
		else printf("0\n");
	}
	return 0;
}