Pagini recente » Monitorul de evaluare | portal | Cod sursa (job #1643710) | Cod sursa (job #2977573) | Cod sursa (job #3310480)
#include <fstream>
#include <cstring>
using namespace std;
ifstream in("xerox.in");
ofstream out("xerox.out");
int t, n, m, x, a, b, y = -1, x1;
string s;
int main()
{
in >> t;
while(t)
{
--t;
in >> n >> a >> b;
while(n)
{
--n;
in >> m;
if (y == -1)
y = m;
else
y ^= m;
while(m)
{
--m;
in >> x >> x1;
}
}
if (y == 0)
out << 0 << '\n';
else
out << 1 << '\n';
y=-1;
}
return 0;
}