Cod sursa(job #2854293)

Utilizator levladiatorDragutoiu Vlad-Ioan levladiator Data 21 februarie 2022 10:33:41
Problema Xerox Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.89 kb
#include <bits/stdc++.h>
#define mp make_pair
#define pb push_back
#define pf push_front
#define ll long long
#define ull unsigned long long
#define pi pair<int,int>
#define pl pair<ll,ll>
#define EPSILON 0.000001

using namespace std;

const ll NMAX = 1e5+5, INF = 1e18, MOD = 1e9 + 7, MMAX = 1e2 + 5, inf = INT_MAX;

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

int T,N,DX,DY,M;

int main()
{
    cin.tie ( 0 )->sync_with_stdio ( 0 );
    cin.tie ( NULL );
    cout.tie ( NULL );

    fin>>T;
    while(T--)
    {
        fin>>N>>DX>>DY;
        int sum_xor=0;
        for(int i=1;i<=N;i++)
        {
            fin>>M;
            for(int j=1;j<=M;j++)
            {
                int x,y;
                fin>>x>>y;
            }
            sum_xor^=M;
        }
        if(sum_xor==0)fout<<0<<'\n';
        else fout<<1<<'\n';
    }

    return 0;
}