Cod sursa(job #3236790)
Utilizator | Data | 1 iulie 2024 18:12:36 | |
---|---|---|---|
Problema | Xerox | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.48 kb |
#include <fstream>
#include <limits>
using namespace std;
ifstream f("xerox.in");
ofstream g("xerox.out");
int main()
{
int T, N, M, S;
f >> T;
while(T--)
{
S = 0;
f >> N;
f.ignore(numeric_limits<streamsize>::max(),'\n');
while(N--)
{
f >> M;
S ^= M;
f.ignore(numeric_limits<streamsize>::max(),'\n');
}
g<<((S!=0)? "1\n" : "0\n");
}
return 0;
}