Cod sursa(job #127332)

Utilizator sandyxpSanduleac Dan sandyxp Data 23 ianuarie 2008 19:13:56
Problema Xerox Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.48 kb
#include <iostream>

#define FIN "xerox.in"
#define FOUT "xerox.out"

int t, n;
int dx, dy;
char buf[10000];

int main()
{
    int i, m, s;
    freopen(FIN, "r", stdin);
    freopen(FOUT,"w",stdout);
    scanf("%d", &t);
    while (t--) {
        s = 0;
        scanf("%d %d %d", &n, &dx, &dy);
        for (i=0; i<n; ++i) {
            scanf("%d", &m);
            s ^= m;
            fgets(buf, 10000, stdin);
        }
        if (s) printf("1\n"); else printf("0\n");
    }
    return 0;
}