Pagini recente » Cod sursa (job #592295) | Cod sursa (job #1601011) | Cod sursa (job #2234322) | Cod sursa (job #2611660) | Cod sursa (job #2788283)
/*
`-/oo+/- ``
.oyhhhhhhyo.`od
+hhhhyyoooos. h/
+hhyso++oosy- /s
.yoooossyyo:``-y`
..----.` ``.-/+:.`
`````..-::/.
`..```.-::///`
`-.....--::::/:
`.......--::////:
`...`....---:::://:
`......``..--:::::///:`
`---.......--:::::////+/`
----------::::::/::///++:
----:---:::::///////////:`
.----::::::////////////:-`
`----::::::::::/::::::::-
`.-----:::::::::::::::-
...----:::::::::/:-`
`.---::/+osss+:`
``.:://///-.
*/
#include <bits/stdc++.h>
#define debug(x) cerr << #x << " " << x << '\n'
#define debugsp(x) cerr << #x << " " << x << ' '
using namespace std;
ifstream in ("xerox.in");
ofstream out ("xerox.out");
const int INF = 2e9;
void Solve () {
int n, useless, ans;
ans = 0;
in >> n >> useless >> useless;
while (n--) {
int x;
in >> x;
ans ^= x;
while (x--)
in >> useless >> useless;
}
if (ans) out << "1\n";
else out << "0\n";
}
int main() {
int t;
in >> t;
while (t--)
Solve();
in.close();
out.close();
return 0;
}