Cod sursa(job #2698349)

Utilizator chriss_b_001Cristian Benghe chriss_b_001 Data 21 ianuarie 2021 19:21:20
Problema Xerox Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.41 kb
#include <fstream>

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";
    }
    return 0;
}