Cod sursa(job #965574)
Utilizator | Data | 24 iunie 2013 10:52:41 | |
---|---|---|---|
Problema | Xerox | Scor | 0 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.49 kb |
program nim;
var bufin,bufout:array[1..100000] of byte;
t,n,i,j,x,s:longint;
begin
assign(input,'nim.in');
reset(input);
settextbuf(input,bufin);
assign(output,'nim.out');
rewrite(output);
settextbuf(output,bufout);
readln(t);
for i:=1 to t do
begin
readln(n);
s:=0;
for j:=1 to n do
begin
readln(x);
s:=s xor x;
end;
if s=0 then writeln(0) else writeln(1);
end;
close(output);
end.