Cod sursa(job #2065864)
Utilizator | Data | 14 noiembrie 2017 13:28:31 | |
---|---|---|---|
Problema | Xerox | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.52 kb |
#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;
}