Cod sursa(job #3310481)

Utilizator pachy2007Pachitanu Matei pachy2007 Data 14 septembrie 2025 11:26:26
Problema Xerox Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.47 kb
#include <bits/stdc++.h>

using namespace std;
ifstream fin("xerox.in");
ofstream fout("xerox.out");
int t,n,dx,dy,xxor,x,y,z;
int main()
{
    fin>>t;
    for(int p=1;p<=t;p++)
    {
        fin>>n>>dx>>dy;
        xxor=0;
        for(int i=1;i<=n;i++)
        {
            fin>>x;
            for(int o=1;o<=x;o++)
                fin>>y>>z;
            xxor=xxor^x;
        }
        if(xxor)fout<<1<<'\n';
        else fout<<0<<'\n';
    }
    return 0;
}