Cod sursa(job #3235437)

Utilizator bogdan1479Luca Bogdan Alexandru bogdan1479 Data 17 iunie 2024 21:29:46
Problema Xerox Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.41 kb
#include <fstream>
using namespace std;
ifstream fin("xerox.in");
ofstream fout("xerox.out");
int main()
{
    int t, n, m, x, y, s;
    fin >> t;
    while(t--)
    {
        s = 0;
        string l;
        fin >> n;
        getline(fin, l);
        while(n--)
        {
            fin >> m;
            getline(fin, l);
            s ^= m;
        }
        fout << (s != 0) << '\n';
    }
}