Cod sursa(job #327498)

Utilizator GheorgheMihaiMihai Gheorghe GheorgheMihai Data 29 iunie 2009 11:01:29
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.39 kb
#include<stdio.h>

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