Cod sursa(job #1212311)
Utilizator | Data | 24 iulie 2014 13:28:42 | |
---|---|---|---|
Problema | Xerox | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.51 kb |
#include <fstream>
#define in "xerox.in"
#define out "xerox.out"
int main()
{
std :: ifstream f(in);
std :: ofstream g(out);
int Teste, N, M, Dx, Dy;
f >> Teste;
while(Teste --) {
f >> N >> Dx >> Dy;
int answ = 0;
while(N --) {
f >> M;
answ ^= M;
while(M --) f >> Dx >> Dy;
}
if(answ) g << "1\n";
else g << "0\n";
}
g.close();
f.close();
return 0;
}