Cod sursa(job #832883)

Utilizator ChallengeMurtaza Alexandru Challenge Data 11 decembrie 2012 17:01:54
Problema Xerox Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.54 kb
#include <fstream>

using namespace std;

const char InFile[]="xerox.in";
const char OutFile[]="xerox.out";

ifstream fin(InFile);
ofstream fout(OutFile);

int T,N,L,junk1,junk2;

int main()
{
	fin>>T;
	for(register int i=1;i<=T;++i)
	{
		fin>>N>>junk1>>junk1;
		int sum=0;
		for(register int j=0;j<=N;++j)
		{
			fin>>L;
			sum^=L;
			for(register int j=0;j<L;++j)
			{
				fin>>junk1>>junk2;
			}
		}
		if(sum)
		{
			fout<<"0\n";
		}
		else
		{
			fout<<"1\n";
		}
	}
	fin.close();
	fout.close();
	return 0;
}