Cod sursa(job #1984317)

Utilizator borcanirobertBorcani Robert borcanirobert Data 24 mai 2017 14:59:30
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.42 kb
#include <iostream>
#include <fstream>
using namespace std;

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

int T, N, sc;

int main()
{
	fin >> T;
	
	while ( T-- )
	{
		int x, y, z;
		fin >> N;
		fin >> x >> y;
		sc = 0;
		while ( N-- )
		{
			fin >> x;
		//	cout << x; cin.get();
			sc = sc ^ x;
			
			while ( x-- )
				fin >> y >> z;
		}
		
		fout << ( sc != 0 ) << '\n';
	}
	
	fin.close();
	fout.close();
	return 0;
}