Cod sursa(job #1560503)

Utilizator DrumeaVDrumea Vasile DrumeaV Data 2 ianuarie 2016 19:48:05
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.56 kb
#include <stdio.h>
#include <string.h>
#include <algorithm>

using namespace std;

int t,n;

int main()
{
    freopen("xerox.in","r",stdin);
    freopen("xerox.out","w",stdout);

     scanf("%d",&t);

     while (t--)
     {
         int sol = 0,aux,dx,dy,x,y;
         scanf("%d %d %d",&n,&dx,&dy);

         while (n--)
         {
             scanf("%d",&aux);
             sol ^= aux;

             while (aux--)
                   scanf("%d %d",&x,&y);
         }

         printf("%d\n",(sol > 0 ? 1 : 0));
     }

  return 0;
}