Cod sursa(job #690424)

Utilizator andreifirstCioara Andrei Ioan andreifirst Data 25 februarie 2012 16:48:34
Problema Xerox Scor 100
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.36 kb
var t, n, m, s, i, j:longint;
    f, g:text;

begin
assign (f, 'xerox.in'); reset (f);
assign (g, 'xerox.out'); rewrite (g);

read (f, t);
for i := 1 to t do
  begin
  readln (f, n);
  s:=0;
  for j := 1 to n do
    begin
    readln (f, m);
    s:=s xor m;
    end;
  if s = 0 then writeln (g, 0) else writeln (g, 1);
  end;

close (f); close (g);
end.