Pagini recente » Profil florinhaja | Cod sursa (job #2095003) | Cod sursa (job #2931656) | Cod sursa (job #106593) | Cod sursa (job #965576)
Cod sursa(job #965576)
program nim;
var bufin,bufout:array[1..100000] of byte;
t,n,i,j,x,s:longint;
begin
assign(input,'xerox.in');
reset(input);
settextbuf(input,bufin);
assign(output,'xerox.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.