Cod sursa(job #1583411)
Utilizator | Data | 28 ianuarie 2016 22:39:45 | |
---|---|---|---|
Problema | Xerox | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.49 kb |
#include <fstream>
#include <iostream>
using namespace std;
int main()
{
ifstream fin("xerox.in");
ofstream fout("xerox.out");
ios_base::sync_with_stdio(false);
int t, n, rez, a, b, x;
fin >> t;
while (t--)
{
fin >> n >> a >> b;
for(rez=0; n; n--)
{
fin >> x;
rez=rez^x;
while(x--)
fin >> a >> b;
}
fout << rez!=0 ? 1:0 << '\n';
}
return 0;
}