Cod sursa(job #1464768)

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