Cod sursa(job #2915478)

Utilizator AlexandruBenescuAlexandru Benescu AlexandruBenescu Data 22 iulie 2022 19:08:04
Problema Xerox Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.36 kb
#include <bits/stdc++.h>
using namespace std;
ifstream fin("xerox.in");
ofstream fout("xerox.out");
int main(){
  int t, n, m, x, useless;
  for (fin >> t; t; t--){
    x = 0;
    for (fin >> n >> useless >> useless; n; n--){
      fin >> m >> useless >> useless;
      x ^= m;
    }
    if (x)
      x = 1;
    fout << x << "\n";
  }
  return 0;
}