Cod sursa(job #2291039)

Utilizator AlexPascu007Pascu Ionut Alexandru AlexPascu007 Data 27 noiembrie 2018 13:28:58
Problema Xerox Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.46 kb
#include <fstream>
using namespace std;
ifstream fin("xerox.in");
ofstream fout("xerox.out");
int t,n,dx,dy,k,sol,i,j,m,px,py;
int main() {
    fin>>t;
    for (i=1;i<=t;i++) {
        fin>>n>>dx>>dy; sol=0;
        for (j=1;j<=n;j++) {
            fin>>m;
            sol^=m;
            for (k=1;k<=m;k++)
                fin>>px>>py;
        }
        if (sol==0)
            fout<<"0\n";
        else
            fout<<"1\n";
    }
    return 0;
}