Pagini recente » Cod sursa (job #2352148) | Cod sursa (job #2642603) | Cod sursa (job #1212526) | Cod sursa (job #129341) | Cod sursa (job #965574)
Cod sursa(job #965574)
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.