Cod sursa(job #377396)

Utilizator MKLOLDragos Ristache MKLOL Data 24 decembrie 2009 13:19:49
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.46 kb
#include<stdio.h>
#define Nmax 10010
int N,y,x,T,S;
int main()
{
freopen("xerox.in","r",stdin);
freopen("xerox.out","w",stdout);
    scanf("%d\n",&T);

    while(T--)
    {S=0;
        scanf("%d%d%d",&N,&x,&x);
        for(int i=1;i<=N;++i)
        {
        scanf("%d",&y);
        for(int j=1;j<=y;++j)
        scanf("%d%d",&x,&x);

        S^=y;
        }
        if(S==0)
        printf("0\n");
        else
        printf("1\n");
    }

}