Cod sursa(job #3285675)

Utilizator TeodorLuchianovTeo Luchianov TeodorLuchianov Data 13 martie 2025 12:35:43
Problema Xerox Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.5 kb
#include <iostream>
#include <fstream>

using namespace std;

ifstream in("xerox.in");
ofstream out("xerox.out");

int main() {

  int t;
  in >> t;
  while(t--) {
    int n, dx, dy, ans = 0;
    in >> n >> dx >> dy;
    for(int i = 1;i <= n;i++) {
      int m;
      in >> m;
      for(int i = 1;i <= m;i++) {
        int cx, cy;
        in >> cx >> cy;
      }
      ans ^= m;
    }
    if(ans == 0) {
      out << "0\n";
    }else {
      out << "1\n";
    }
  }
  return 0;
}