uses crt;
var a:array[1..100]of integer;
i,n,k,dmin,dmax:integer;
begin
clrscr;
write('n='); readln(n);
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
{-----------xuat-day---------------------}
for i:=1 to n do
write(a[i]:4);
{-----------xu-ly------------------------}
writeln;
write('nhap so k='); readln(k);
dmin:=0;
dmax:=0;
for i:=1 to n do
begin
if a[i]<k then inc(dmin);
if a[i]>k then inc(dmax);
end;
writeln('so phan tu nho hon ',k,' trong day so la: ',dmin);
writeln('so phan tu lon hon ',k,' trong day so la: ',dmax);
readln;
end.