Cod sursa(job #2785210)

Utilizator MohneaGosuMihnea Gusu MohneaGosu Data 18 octombrie 2021 10:21:40
Problema Xerox Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.45 kb
#include <fstream>

using namespace std;
ifstream Gigi ("xerox.in");
ofstream Marcel ("xerox.out");
int main()
{
    int n,x,a,b,k,m;
    x=0;
    Gigi>>n;
    while(n--)
    {
        x=0;
        Gigi>>m>>a>>b;
        while(m--){
            Gigi>>k;
            x^=k;
            while(k--){
                Gigi>>a>>b;
            }
        }
        if (x) Marcel<<1<<"\n";
        else Marcel<<0<<"\n";
    }
    return 0;
}