Cod sursa(job #1732798)

Utilizator alittlezzCazaciuc Valentin alittlezz Data 22 iulie 2016 16:18:53
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.71 kb
#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;
}