Cod sursa(job #680239)

Utilizator rootsroots1 roots Data 15 februarie 2012 08:33:15
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.48 kb
#include <fstream>

using namespace std;

ifstream in;
ofstream out;

int main()
{
    int T,N,M,x,y;

    in.open("xerox.in");

    in>>T;

    out.open("xerox.out");

    while(T--)
    {
        int sum=0;
        in>>N>>x>>y;
        for(int i=1;i<=N;++i)
        {
            in>>M;
            for(int j=1;j<=M;++j)
                in>>x>>y;
            sum^=M;
        }

        if(sum==0) out<<"0\n";
        else out<<"1\n";
    }

    in.close();
    out.close();

    return 0;
}