Pagini recente » Cod sursa (job #2314869) | Cod sursa (job #846337) | Cod sursa (job #1716421) | Cod sursa (job #1440920) | Cod sursa (job #3233119)
#include <iostream>
#include <fstream>
#define nl '\n'
using namespace std;
ifstream fin("xerox.in");
ofstream fout("xerox.out");
void solve()
{
int n, m, x, y, ans = 0;
fin >> n >> x >> y;
for (int i = 1; i <= n; i++)
{
fin >> m;
for (int j = 1; j <= m; j++)
fin >> x >> y;
ans ^= m;
}
if (ans)
fout << 1;
else
fout << 0;
fout << nl;
return;
}
int main()
{
int t;
fin >> t;
while(t--)
{
solve();
}
return 0;
}