Cod sursa(job #126373)

Utilizator VmanDuta Vlad Vman Data 21 ianuarie 2008 22:55:31
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.5 kb
#include <stdio.h>

int N,M,T,i,s,x,y,j;

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