Cod sursa(job #1125900)

Utilizator denis_tdrdenis tdr denis_tdr Data 26 februarie 2014 20:06:52
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.43 kb
#include <fstream>
#include <iostream>
using namespace std;

int main(){
    ifstream f("xerox.in");
    ofstream g("xerox.out");
    int t, n, dx, dy, a ,b;
    f>>t;
    int s, x;
    while(t--)
    {
        s=0;
        f>>n>>dx>>dy;
        while(n--)
        {
            f>>x, s=s^x;
            while(x--) f>>dx>>dy;
        }
        g<<(s?"1":"0")<<"\n";
    }
    f.close();
    g.close();
    return 0;
}