Cod sursa(job #2487097)

Utilizator armigheGheorghe Liviu Armand armighe Data 3 noiembrie 2019 22:19:21
Problema Xerox Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.46 kb
#include<fstream>
using namespace std;
ifstream f("xerox.in");
ofstream g("xerox.out");

int main()
{
    int t,i,j,n,sol,x,a,b,l;
    f>>t;
    for(j=1;j<=t;j++)
    {
        f>>n>>a>>b;
        sol=0;
        for(i=1;i<=n;i++)
        {
            f>>x;
            for(l=1;l<=x;l++)
                f>>a>>b;
            sol^=x;
        }
        if(sol==0)
            g<<0<<'\n';
        else
            g<<1<<'\n';
    }
    return 0;
}