Cod sursa(job #1681670)

Utilizator robertkarolRobert Szarvas robertkarol Data 9 aprilie 2016 17:19:41
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.47 kb
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("xerox.in");
ofstream fout("xerox.out");
int t,h,i,j,n,dx,dy,x,y,sol,m;
int main()
{
    fin>>t;
    for(h=1;h<=t;h++)
    {
        fin>>n>>dx>>dy; sol=0;
        for(i=1;i<=n;i++)
        {
            fin>>m;
            sol^=m;
            for(j=1;j<=m;j++)
                fin>>x>>y;
        }
        fout<<(int)(sol!=0)<<"\n";///ce face un '\n' din program :))
    }
    return 0;
}