Pagini recente » Cod sursa (job #2471768) | Cod sursa (job #1133883) | Rating Pogurschi Andrei (dmandy) | Cod sursa (job #1915091) | Cod sursa (job #1732798)
#include <fstream>
#include <math.h>
#include <algorithm>
#include <string>
using namespace std;
string problemName = "xerox";
string inFile = problemName+".in";
string outFile = problemName+".out";
ifstream fin(inFile.c_str());
ofstream fout(outFile.c_str());
int main(){
int t, n, test, i, x, sxor, y;
fin>>t;
for(test = 1;test <= t;test++){
fin>>n>>x>>y;
sxor = 0;
for(i = 1;i <= n;i++){
fin>>x;
sxor ^= x;
for(int j = 1;j <= x;j++){
fin>>y>>y;
}
}
if(sxor){
fout<<"1";
}else{
fout<<"0";
}
fout<<'\n';
}
return 0;
}