Cod sursa(job #1560497)

Utilizator DrumeaVDrumea Vasile DrumeaV Data 2 ianuarie 2016 19:43:51
Problema Xerox Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.46 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 %d %d",&aux,&x,&y),sol ^= aux;

         printf("%d\n",int(sol > 0));
     }

  return 0;
}