program Project2; {$APPTYPE CONSOLE} type tpoint= record c: array[0..13] of longint; end; tmass= array [0..101] of tpoint; function perevir(a:tmass; k:integer): boolean; var p: boolean; i,j,l: integer; begin p:= false; for i:=1 to 12 do for j:=1 to 12 do if a[k].c[i] = a[k].c[j] then inc(l); writeln(l); if l=18 then p:= true; perevir:=p; end; begin { TODO -oUser -cConsole Main : Insert code here } assign(input,'matches.in'); reset(input); assign(output,'matches.out'); rewrite(output); readln(n); for i:=1 to n do for j:=1 to 8 do begin read(a[i].c[j]); perevir(a[i],i); writeln(perevir); end; end.