Cod sursa(job #1075675)

Utilizator sleepaholicNeculaescu Theodor sleepaholic Data 9 ianuarie 2014 14:13:50
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.44 kb
#include <fstream>
using namespace std;
ifstream f("xerox.in");
ofstream g("xerox.out");
 
int t, N, M, dx, dy, x, y, sol;
 
int main()
{
    f>>t;
    while (t--)
    {
        sol=0;
        f>>N>>dx>>dy;
        for (int i=1; i<=N; ++i)
        {
            f>>M; sol^=M;
            for (int j=1; j<=M; ++j)
                f>>x>>y;
        }
        if (sol) g<<1<<'\n';
            else g<<0<<'\n';
    }
    return 0;
}