Cod sursa(job #1210750)

Utilizator ovidiuz98Zamfir Ovidiu ovidiuz98 Data 20 iulie 2014 23:31:34
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.33 kb
#include <fstream>
using namespace std;
int main(){
    ifstream f("xerox.in");
    ofstream g("xerox.out");
    int t,n,a,b,s,x;
    f>>t;
    while(t--){
        s=0;
        f>>n>>a>>b;
        while(n--){
            f>>x, s=s^x;
            while(x--)f>>a>>b;
        }
        g<<(s?1:0)<<"\n";
    }
    return 0;
}