Cod sursa(job #922247)

Utilizator tzipleatudTudor Tiplea tzipleatud Data 21 martie 2013 23:43:09
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.47 kb
#include <fstream>

using namespace std;

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

int T, N, M;
int Sum, i, j, x;

int main ()
{
    for (f >> T; T; --T)
    {
        Sum=0;
        f >> N >> x >> x;
        for (i=1; i<=N; i++)
        {
            f >> M;
            Sum^=M;
            for (j=1; j<=M; j++)
                f >> x >> x;
        }
        g << (Sum!=0) << '\n';
    }

    f.close();
    g.close();

    return 0;
}