Cod sursa(job #2383963)
Utilizator | Vamanu Petru Gabriel petrisorvmy | Data | 19 martie 2019 22:05:32 |
---|---|---|---|
Problema | Xerox | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.6 kb |
#include <fstream>
using namespace std;
ifstream f("xerox.in");
ofstream g("xerox.out");
int n,t, npuncte, x,y;
int main()
{
f >> t;
while(t)
{
f >> n >> x >> y;
int xorsol=0;
while(n)
{
f>>npuncte;
for(int i = 1; i <=npuncte; ++i)
{
f >> x >> y;
}
xorsol = xorsol ^ npuncte;
n--;
}
t--;
if(xorsol)
g<< 1 << '\n';
else
g<< 0 << '\n';
}
g.close();
f.close();
return 0;
}