Cod sursa(job #2556932)

Utilizator ArdeleanOficialAlexandru ArdeleanOficial Data 25 februarie 2020 12:40:19
Problema Xerox Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.59 kb
///ba peti ce kkt te-a apucat si de unde ai scos problema asta

#include <bits/stdc++.h>

using namespace std;

int main()
{
    ifstream fin("xerox.in");
    ofstream fout("xerox.out");
    ios_base::sync_with_stdio(NULL);
    fin.tie(0);
    fout.tie(0);
    int t, n, a;
    fin >> t;
    while (t--) {
        int s(0), x;
        fin >> n >> a >> a;
        for (int i = 1; i <= n; ++i) {
            fin >> x;
            s ^= x;
            for (int j = 1; j <= x; ++j)
                fin >> a >> a;
        }
        fout << (s != 0) << '\n';
    }
    return 0;
}