Cod sursa(job #1464890)

Utilizator iulianrotaruRotaru Gheorghe-Iulian iulianrotaru Data 25 iulie 2015 22:13:49
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.36 kb
#include <fstream>
using namespace std;
ifstream f("xerox.in");
ofstream g("xerox.out");
int t,n,s,a,x,i;
int main()
{
    f>>t;
    while(t--)
    {
        s=0;
        f>>n>>x>>x;
        while(n--)
        {
            f>>a;
            s^=a;
            for(i=0;i<a;++i) f>>x>>x;
        }
        g<<(s ? 1:0)<<'\n';
    }
    return 0;
}