Cod sursa(job #1001967)

Utilizator DaNutZ2UuUUBB Bora Dan DaNutZ2UuU Data 26 septembrie 2013 17:25:40
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.44 kb
#include <iostream>
#include <fstream>

using namespace std;

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

bool solve()
{
    int n, m, x, y, s = 0;

    f >> n >> x >> y;

    for ( ; n; n-- )
    {
        f >> m;
        s ^= m;

        for ( ; m; m-- )
            f >> x >> y;
    }

    return s;
}

int main()
{
    int T;

    f >> T;

    for( ; T; T-- )
        g << solve() << "\n";

    return 0;
}