Cod sursa(job #2910074)

Utilizator vlad2009Vlad Tutunaru vlad2009 Data 18 iunie 2022 12:36:44
Problema Xerox Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.51 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 >> aux >> aux;
            answer ^= x;
        }
        if (answer == 0) {
            fout << "0\n";
        } else {
            fout << "1\n";
        }
    }
    return 0;
}