Cod sursa(job #1475467)

Utilizator tamionvTamio Vesa Nakajima tamionv Data 24 august 2015 08:57:06
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.4 kb
#include <fstream>
#include <limits>
using namespace std;

int main(){
	ifstream f("xerox.in");
	ofstream g("xerox.out");
	int t = 0;
	f >> t;
	for(int i = 0, n; i < t; ++i){
		int rez = 0;
		f >> n;
		f.ignore(numeric_limits<streamsize>::max(), '\n');
		for(int j = 0, m; j < n; ++j){
			f >> m;
			rez ^= m;
			f.ignore(numeric_limits<streamsize>::max(), '\n'); }
		g << (bool)rez << '\n'; }
	return 0; }