Cod sursa(job #129874)
Utilizator | Matei Misarca M@2Te4i | Data | 30 ianuarie 2008 14:26:51 |
---|---|---|---|
Problema | Xerox | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.63 kb |
#include <stdio.h>
using namespace std;
void citire()
{
freopen("xerox.in","r",stdin);
freopen("xerox.out","w",stdout);
int t,n,x,s,b;
scanf("%d", &t);
for (int i=1; i<=t; i++)
{
scanf("%d%d%d", &n, &b, &b);
s=0;
for (int j=1; j<=n; j++)
{
scanf("%d", &x);
s^=x;
for (int k=1; k<=x; k++)
scanf("%d%d", &b, &b);
}
if (s==0)
printf("0\n");
else
printf("1\n");
}
fclose(stdin);
fclose(stdout);
}
int main()
{
citire();
return 0;
}