Cod sursa(job #125172)
Utilizator | Sima Cotizo sima_cotizo | Data | 20 ianuarie 2008 11:51:06 |
---|---|---|---|
Problema | Xerox | Scor | 100 |
Compilator | cpp | Status | done |
Runda | preONI 2008, Runda 3, Clasele 11-12 | Marime | 0.43 kb |
#include <cstdio>
int main() {
freopen("xerox.in", "r", stdin);
freopen("xerox.out","w",stdout);
long T;
scanf("%ld", &T);
while ( T-- ) {
long x, y, p, n, m;
scanf("%ld %ld %ld", &n, &x, &y);
for (long i=0; i<n; ++i) {
scanf("%ld", &m);
if ( i )
p ^= m;
else
p = m;
for (long j=0; j<m; ++j)
scanf("%ld %ld", &x, &y);
}
printf("%d\n", (p!=0) ? 1 : 0);
}
fclose(stdin); fclose(stdout);
return 0;
}