Cod sursa(job #1174244)

Utilizator gabrielinelusGabriel-Robert Inelus gabrielinelus Data 22 aprilie 2014 14:00:54
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.55 kb
#include <cstdio>

using namespace std;

int main()
{
    freopen("xerox.in","r",stdin);
    freopen("xerox.out","w",stdout);

    int N,T,trash,x,xorsum = 0;
    scanf("%d",&T);
    while(T--)
    {
        xorsum  = 0; /// daca nu reinitializam e bai mare :))
        scanf("%d",&N);
        scanf("%d%d",&trash,&trash);
        while(N--){
            scanf("%d",&x);
            xorsum ^= x; /// number of points
            while(x -- )scanf("%d%d",&trash,&trash);
        }
        printf("%d\n",(xorsum > 0));
    }

    return 0;
}