Cod sursa(job #3233119)

Utilizator Mihai_999Diaconeasa Mihai Mihai_999 Data 2 iunie 2024 15:19:41
Problema Xerox Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.56 kb
#include <iostream>
#include <fstream>
#define nl '\n'

using namespace std;

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

void solve()
{
    int n, m, x, y, ans = 0;
    fin >> n >> x >> y;
    for (int i = 1; i <= n; i++)
    {
        fin >> m;
        for (int j = 1; j <= m; j++)
            fin >> x >> y;
        ans ^= m;
    }
    if (ans)
        fout << 1;
    else
        fout << 0;
    fout << nl;
    return;
}

int main()
{
    int t;
    fin >> t;
    while(t--)
    {
        solve();
    }
    return 0;
}