Cod sursa(job #1401567)

Utilizator AndyCatrunaCatruna Andy AndyCatruna Data 25 martie 2015 23:19:09
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.49 kb
#include <fstream>
using namespace std;
ifstream fin("xerox.in");
ofstream fout("xerox.out");
int n,i,j,t,dx,dy,x,y,s,m;
int main(){
    fin>>t;
    while(t--){
        fin>>n>>dx>>dy;
        s=0;
        for(i=1;i<=n;i++){
            fin>>m;
            for(j=1;j<=m;j++){
                fin>>x>>y;
            }
            s^=m;
        }
        if(s){
            fout<<1<<"\n";
        }
        else{
            fout<<0<<"\n";
        }
    }

    return 0;
}