Cod sursa(job #1125920)

Utilizator denis_tdrdenis tdr denis_tdr Data 26 februarie 2014 20:13:59
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.27 kb
#include <fstream>
using namespace std;
int main(){
	ifstream f("xerox.in");
	ofstream g("xerox.out");
	int t,n,a,b,s,x;
	f>>t;
	while(t--){
		s=0;
		f>>n>>a>>b;
		while(n--){
			f>>x, s=s^x;
			while(x--)f>>a>>b;
		}
		g<<(s?1:0)<<"\n";
	}
	return 0;
}