Cod sursa(job #926306)

Utilizator apopeid13Apopeid Alejandro apopeid13 Data 25 martie 2013 09:32:28
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;
}