Cod sursa(job #2789739)

Utilizator grecu_tudorGrecu Tudor grecu_tudor Data 27 octombrie 2021 21:22:35
Problema Xerox Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.35 kb
#include <fstream>

using namespace std;

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

int main() {
  int t, n, m, x, y, s;

  fin >> t;
  while ( t-- ) {
	fin >> n >> x >> y;
    s = 0;
	while ( n-- ) {
      fin >> m;
	  s ^= m;
	  while ( m-- ) fin >> x >> y;
	}
	fout << (s != 0) << "\n";
  }
  fin.close();
  fout.close();
  return 0;
}