Pagini recente » Cod sursa (job #2867569) | Cod sursa (job #2053729) | Cod sursa (job #2071237) | Cod sursa (job #4843) | Cod sursa (job #185331)
Cod sursa(job #185331)
#include <stdio.h>
#include <iostream>
#include <fstream>
using namespace std;
int main(void){
ifstream in("xerox.in" );
ofstream out("xerox.out");
int T, N, M, gr, gr2, sol = 0;
in >> T;
for (int i=0;i<T;i++){
in >> N >> gr >> gr2;
for (int k=0;k<N;k++){
in >> M;
for (int j=0;j<M;j++)
in >> gr >> gr2;
sol ^= M;
}
if (sol) out << 1 << "\n";
else out << 0 << "\n";
sol = 0;
}
//cin >> N;
in.close();
out.close();
return 0;
}