Cod sursa(job #3310476)

Utilizator pachy2007Pachitanu Matei pachy2007 Data 14 septembrie 2025 11:23:04
Problema Xerox Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.43 kb
#include <bits/stdc++.h>

using namespace std;
ifstream fin("xerox.in");
ofstream fout("xerox.in");
int t,n,dx,dy,xxor,x,y,z;
string s;
int main()
{
    fin>>t;
    for(int p=1;p<=t;p++)
    {
        fin>>n>>dx>>dy;
        xxor=0;
        for(int i=1;i<=n;i++)
        {
            fin>>x>>y>>z;
            xxor=xxor^x;
        }
        if(xxor>0)fout<<1<<'\n';
        else fout<<0<<'\n';
    }
    return 0;
}