Cod sursa(job #1464887)

Utilizator iulianrotaruRotaru Gheorghe-Iulian iulianrotaru Data 25 iulie 2015 22:11:16
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,s,a;
char x[1000];
int main()
{
    f>>t;
    while(t--)
    {
        s=0;
        f>>n>>x;
        while(n--) f>>a>>x,s^=a;
        g<<(s ? 1:0)<<'\n';
    }
    return 0;
}