Cod sursa(job #2237905)
| Utilizator | Data | 3 septembrie 2018 21:34:32 | |
|---|---|---|---|
| Problema | Xerox | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.54 kb |
#include <iostream>
#include <fstream>
using namespace std;
ifstream f ("xerox.in");
ofstream g ("xerox.out");
int T,nrFoi,nrPuncte;
int main()
{
f>>T;
for(int i=1;i<=T;i++)
{
int DX,DY,s=0 ;
f>>nrFoi>>DX>>DY;
for(int j=1;j<=nrFoi;j++)
{
f>>nrPuncte;
string trash;
getline(f,trash);
trash = "";
s ^= nrPuncte;
}
if(s) g<<"1\n";
else g<<"0\n";
}
//for(int i=1;i<=T)
return 0;
}
