Cod sursa(job #3310483)

Utilizator Gerald123Ursan George Gerald123 Data 14 septembrie 2025 11:28:14
Problema Xerox Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.42 kb
#include <bits/stdc++.h>
using namespace std;

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

int i, n, x, s, xs, ys, t, j, y;

int main()
{
  fin >> t;
  for (i = 1; i <= t; i++)
  {
    fin >> n >> xs >> ys;
    for (j = 1; j <= n; j++)
    {
      fin >> x;
      for(y=1;y<=x;y++)
        fin>>xs>>ys;
      s ^= x;
    }
    if (s)
      fout << 1 << '\n';
    else
      fout << 0 << '\n';
    s = 0;
  }

  return 0;
}