Pagini recente » Cod sursa (job #158891) | Diferente pentru documentatie/rating intre reviziile 6 si 24 | Fabrica | Cod sursa (job #2474540) | Cod sursa (job #2065864)
#include <bits/stdc++.h>
using namespace std;
ifstream f ("xerox.in");
ofstream g ("xerox.out");
int n, x, m, t;
int main() {
f >> t;
while ( t-- ) {
f >> n >> x >> x;
int ans = 0;
for (int i = 1; i <= n; ++ i) {
f >> m;
ans ^= m;
for (int j = 1; j <= m; ++ j) {
f >> x >> x;
}
}
if (ans)
g << 1 << '\n';
else
g << 0 << '\n';
}
return 0;
}