Pagini recente » Cod sursa (job #1781593) | Cod sursa (job #632362) | Cod sursa (job #2700325) | Cod sursa (job #2121925) | Cod sursa (job #1067428)
#include <fstream>
#include <iostream>
using namespace std;
ifstream f("xerox.in");
ofstream g("xerox.out");
int main()
{
int t, n, m, dx, dy, x, y, xor_x=0, xor_y=0, xor_f=0;
bool ok;
f>>t;
while(t--)
{
f>>n>>dx>>dy;
while(n--)
{
f>>m;
for(int i = 1; i<=m; i++)
{
f>>x>>y;
xor_x ^= x;
xor_y ^= y;
}
xor_f = xor_x^xor_y;
}
if(xor_f)
{
ok = 1;
}
else
{
ok = 0;
}
}
g<<ok;
}