Cod sursa(job #3252344)

Utilizator stefan_dore_Stefan Dore stefan_dore_ Data 29 octombrie 2024 12:00:36
Problema Xerox Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.44 kb
#include <iostream>
#include <fstream>
using namespace std;

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

int T, N, M, S, DX, DY, X, Y;

int main()
{
    f >> T;
    while(T--) {
        f >> N >> DX >> DY;
        while(N--) {
            f >> M;
            while(M--)
                f >> X >> Y;
            S ^= M;
        }
        g << (S != 0 ? "1\n" : "0\n");
    }
    f.close();
    g.close();
    return 0;
}