Cod sursa(job #2910087)

Utilizator vlad2009Vlad Tutunaru vlad2009 Data 18 iunie 2022 13:02:29
Problema Xerox Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.59 kb
#include <fstream>

using namespace std;

int main() {
    ifstream fin("xerox.in");
    ofstream fout("xerox.out");
    int t;
    fin >> t;
    while (t--) {
        int n, dx, dy;
        fin >> n >> dx >> dy;
        int answer = 0;
        for (int i = 1; i <= n; i++) {
            int x, aux;
            fin >> x;
            for (int j = 1; j <= x; j++) {
                fin >> aux >> aux;
            }
            answer ^= x;
        }
        if (answer == 0) {
            fout << "0\n";
        } else {
            fout << "1\n";
        }
    }
    return 0;
}