Cod sursa(job #2289527)

Utilizator dey44andIoja Andrei-Iosif dey44and Data 24 noiembrie 2018 18:52:37
Problema Xerox Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.68 kb
#include <fstream>

using namespace std;

ifstream beacotnari("xerox.in.");
ofstream sipotifirege("xerox.out");

int teste;

void SiLaVinNuMaiAlege()
{
	beacotnari >> teste;
	for (int test = 1; test <= teste; test++)
	{
		int foi_de_rulat, latime, lungime;
		beacotnari >> foi_de_rulat >> latime >> lungime;
		int tezaur = 0, prima_risipa, a_doua_risipa, bani_la_lautari;
		for (int foicica = 1; foicica <= foi_de_rulat; foicica++)
		{
			beacotnari >> bani_la_lautari >> prima_risipa >> a_doua_risipa;
			tezaur = (tezaur ^ bani_la_lautari);
		}
		if (tezaur) sipotifirege << "1\n";
		else sipotifirege << "0\n";
	}
}

int main()
{
	SiLaVinNuMaiAlege();
	return 0;
}