Pagini recente » Monitorul de evaluare | Monitorul de evaluare | Diferente pentru utilizator/stargold2 intre reviziile 6 si 7 | Cod sursa (job #1516509) | Cod sursa (job #2785736)
#include <bits/stdc++.h>
using namespace std;
int main()
{
ifstream fin("xerox.in");
ofstream fout("xerox.out");
int t,n,m,a,b,ans;
fin >> t;
while (t--) {
fin >> n >> a >> b;
ans = 0;
for (int i = 0;i < n;i++) {
fin >> m;
ans = (ans ^ m);
for (int j = 0;j < m;j++)
fin >> a >> b;
}
if (ans)
ans = 1;
fout << ans << '\n';
}
return 0;
}