Cod sursa(job #2649952)

Utilizator OctavianVasileVasileOctavian OctavianVasile Data 16 septembrie 2020 21:39:04
Problema Xerox Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.52 kb
#include <bits/stdc++.h>
using namespace std;
ifstream fin ("xerox.in");
ofstream fout ("xerox.out");
int T, n, x, y, sum, M;
int main (){
    fin >> T;
    for (int t = 1; t <= T; t ++){
        sum = 0;
        fin >> n >> x >> y;
        for (int i = 1; i <= n; i ++){
            fin >> M;
            sum ^= M;
            for (int j = 1; j <= x; j ++)
                fin >> x >> y;
        }
        if (sum != 0)
            fout << 1 << '\n';
        else fout << 0 << '\n';
    }
    return 0;
}