Cod sursa(job #1399404)

Utilizator Adrian1997Radulescu Adrian Adrian1997 Data 24 martie 2015 18:50:13
Problema Xerox Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.47 kb
#include <fstream>
using namespace std;
ifstream f("xerox.in");
ofstream g("xerox.out");
int t,n,m;
pair<int,int> x;

int main(void){
    register int i,j,dx,dy,tot;

    f>>t;
    for(;t>0;t--){
        f>>n>>dx>>dy;
        tot=0;
        for(i=1;i<=n;i++){
            f>>m;
            for(j=1;j<=m;j++) f>>x.first>>x.second;
            tot^=m;
        }
        if(tot) g<<"1\n";
        else g<<"0";
    }
    f.close();
    g.close();
    return 0;
}