Cod sursa(job #3288346)

Utilizator StefanRaresStefan Rares StefanRares Data 21 martie 2025 17:10:31
Problema Xerox Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.51 kb
#include <iostream>
#include <fstream>
using namespace std;
ifstream f("xerox.in");
ofstream g("xerox.out");
int main()
{
    int n, T, Dx, Dy, sol, x, y, m;
    f >> T;
    while(T--)
    {
        f >> n >> Dx >> Dy;
        sol = 0;
        while(n--)
        {
            f >> m;
            for(int i = 1; i <= m; i++)
                f >> x >> y;
            sol ^= m;
        }
        if(!sol) g << "0\n";
        else g << "1\n";
    }
    f.close();
    g.close();
    return 0;
}