Cod sursa(job #1072856)
| Utilizator | Data | 5 ianuarie 2014 00:25:42 | |
|---|---|---|---|
| Problema | Xerox | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.55 kb |
#include <cstdio>
using namespace std;
int main()
{
int T,N,Dx,Dy,i,sumaNIM,x,a,b;
freopen ("xerox.in","r",stdin);
freopen ("xerox.out","w",stdout);
scanf("%d", &T);
while(T--)
{
scanf("%d%d%d", &N,&Dx,&Dy);
sumaNIM=0;
for(i=1;i<=N;++i)
{
scanf("%d", &x);
sumaNIM^=x;
while(x--)
scanf("%d%d", &a,&b);
}
if(!sumaNIM)
printf("0\n");
else
printf("1\n");
}
return 0;
}
