Cod sursa(job #2977508)
Utilizator | francesco martinut francescom_481 | Data | 11 februarie 2023 18:40:18 |
---|---|---|---|
Problema | Xerox | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.49 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("xerox.in");
ofstream fout("xerox.out");
#define cin fin
#define cout fout
#define N 5005
int t, n, x, a, y;
int main()
{
cin >> t;
for( ; t ; t--)
{
cin >> n >> a >> b;
cin >> x >> a >> b;
for(int i = 2 ; i <= n ; i++)
{
cin >> y >> a >> b;
x ^= y;
}
if(x == 0)cout << "0\n";
else cout << "1\n";
}
return 0;
}