Cod sursa(job #2494107)

Utilizator Cezar211Popoveniuc Cezar Cezar211 Data 17 noiembrie 2019 12:50:53
Problema Xerox Scor 0
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, x, y, m;
int main()
{
    fin >> T;
    while(T--)
    {
        fin >> n >> x >> y;
        int s = 0;
        for(int i=1; i<=n; i++)
        {
            fin >> m;
            while(m--)
                fin >> x >> y;
            s^=m;
        }
        if(s)
            fout << "1\n";
        else fout << "0\n";
    }
    return 0;
}