Cod sursa(job #2493573)

Utilizator AlexTudor777Alex Brinza AlexTudor777 Data 16 noiembrie 2019 14:56:09
Problema Xerox Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.54 kb
#include <iostream>
#include <fstream>
using namespace std;

ifstream fin("xerox.in");
ofstream fout("xerox.out");

int task,a,b,n,sol,x;

void rezolvare()
{
    fin>>task;

    for(int k=1;k<=task;++k)
    {
        fin>>n>>a>>b;

        sol=0;
        for(int i=1;i<=n;++i)
        {
            fin>>x;

            for(int j=1;j<=x;++j)
                fin>>a>>b;
            sol^=x;
        }

        if(sol==0) fout<<0<<"\n";
        else fout<<1<<"\n";
    }
}

int main()
{
	rezolvare();
	return 0;
}