Kod: Zaznacz cały
program trzy_elementy;
var tab: array[1..1000] of Longint;
i, n,j,a: Longint;
rowna: Longint;
czy: Boolean;
begin
Read(n);
czy := false;
for i:=1 to n do
Read(tab[i]);
rowna:=0;
for i:=1 to n do
begin
for j:=1 to n do
if tab[i] = tab[j] then
rowna := rowna+1;
if rowna > 2 then czy := true;
end;
if czy then Write('TAK')
else Write('Nie');
read(a);
end.