Cod sursa(job #3236785)

Utilizator MilitaruMihai2022Millitaru Mihai MilitaruMihai2022 Data 1 iulie 2024 17:58:35
Problema Xerox Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.43 kb
#include <bits/stdc++.h>

using namespace std;

ifstream f("xerox.in");
ofstream g("xerox.out");

int main()
{
    int T,N,M,S,dx,dy,x,y;
    f>>T;
    while(T--)
    {
        S=0;
        f>>N>>dx>>dy;
        while(N--)
        {
            f>>M;
            S ^=M;
            while(M--)
                f>>x>>y;
        }
        g<<((S!=0)? "1\n" : "0\n");
    }
    f.close();
    g.close();
    return 0;
}