Cod sursa(job #1662310)

Utilizator arhivamanArhiva Man arhivaman Data 24 martie 2016 17:41:14
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.5 kb
#include <fstream>

using namespace std;
ifstream fin("xerox.in");
ofstream fout("xerox.out");
int main()
{
    int t;
    fin>>t;
    while(t--)
    {
        int sum=0, n, x, y, k;
        fin>>n>>x>>y;
        while(n--)
        {
            fin>>k;
            sum=sum ^ k;
            while(k--)
            {
                fin>>x>>y;
            }
        }
        if(sum==0)
            fout<<0;
        else
            fout<<1;
        fout<<'\n';
    }
    return 0;
}