Cod sursa(job #608863)

Utilizator ctlin04UAIC.VlasCatalin ctlin04 Data 18 august 2011 14:57:34
Problema Xerox Scor 0
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.52 kb
Program xerox;
var t,n,m,dx,dy,x,y,rez,i,j,k:longint;
    b1,b2:array [1..1 shl 10] of char;
    fi,fo:text;
begin
 assign(fi,'xerox.in');
  assign(fo,'xerox.out');
 settextbuf(fi,b1);
 settextbuf(fo,b2);
 reset(fi);
  rewrite(fo);
 readln(fi,t);
 for i:=1 to t do begin
  readln(fi,n);
   for j:=1 to n do begin
    read(fi,m);
      readln(fi);
      if i=1 then rez:=m
       else
      rez:=rez xor m;
      if rez>0 then writeln(fo,'1')
       else writeln(fo,'0');
     end;
   end;
  close(fo);
end.