Cod sursa(job #2850239)

Utilizator valentinchipuc123Valentin Chipuc valentinchipuc123 Data 16 februarie 2022 13:55:40
Problema Xerox Scor 100
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;
}