Cod sursa(job #3288396)

Utilizator raulthestormIlie Raul Ionut raulthestorm Data 21 martie 2025 22:37:23
Problema Xerox Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.44 kb
#include <fstream>

using namespace std;

ifstream f("xerox.in");
ofstream g("xerox.out");

int main()
{
    string s;
    int T, n, m, ans;
    f >> T;
    while(T--)
    {
        ans = 0;
        f >> n;
        getline(f, s);
        while(n--)
        {
            f >> m;
            ans ^= m;
            getline(f, s);
        }
        g << (ans != 0) << '\n';
    }
    f.close();
    g.close();
    return 0;
}