?????:
???????????? ?????? ????? ???? (???????????). ?????????? ???????????? ?? ????????????? ? ??????????? ???? ?? ??????. ??? ???? ????????????? ????? ?? ?????? ??????? ? ?????? ??????.

????????:
???????????: ?I am going at home. They are going at home too.?
?????? ?????: [?i?, ?am?, ?going?, ?at?, ?home?, ?they?, ?are?, ?too?]

???????? ??????? ??????:
????? ???????????(?) ?????? ????????????, ? ??, ??? ?? ????, ???????? ? ????????? ?????????? u (??? ?? ?????????? ?? ????? user). ??? ????? ??????????? ??????? ????? ? ????, ??? ? ????? ???????????????? ??????? ????? ?????? ?? ????? ????????? 255 ????????.
u: string;
??????? ??????, ? ??????? ????? ??????????? ????????? ?????, ws (?????????? ?? ????? words). ????? ?????? ????? ????? ???????? ????? ??????? ??????, ?? ????? ?????? ? ????????????? ???????? ????????????. ???? ? ???, ??? ???? ????????????, ?????? ?? ????? ???????? ? ?????? ??????????, ?? ?????? ????? ???????? ?? ?????? ????????. ???? ???????????? ????? ??????? ????? ? ??????? ?? 40 ????????, ?? ?????? ????? ???????? ???-?? ?? 6 ?????????. ???? ?? ???????????? ????? ?????? ????? ???????? ?? ?????? ???????? ??? ?????-???? ??????, ?? ????????? 128 ????????? ? 127 ????? ??????????, ??????? ?? ???????????. ???????, ?????? ??????????? ??????? ?? 128 ????????? ?????????. ? ??? ???? ????? ????? ???????? ?? ???? ????, ?? ????????? 85 ???? (256 / 3, ?.?. ??? ????? + ???? ????). ???! ?? ????? ??????. ????? ????? ???:
ws: array[1..100] of string;
??????????? ??????????, ? ??????? ????? ????????? ??????? ?????, ????? ??? ?????????? ? ??????.
w: string;
????????? ???????????????? ?????? ?????? ???????????, ?????????? ?????????????. ??????? ????????? ??????, ?????? ??? ?????. ??? ????? ????? ???????????? ?????????? ??????? ??????? length. ??? ????????? ?????????? ???????? ? ??????, ??? ????? ????? ????????? ?????-?????? ????????????? ??????????.
len: integer;
??????????? ??? ????????: ??? ????????? ???????? ?????? (??????????? ????????????), ????????? ??????? ? ????? ?????????? ?????? ? ???? ?????????? ???? ? ??????? ???????? ?????????? ???? ????.
i, j, q: byte;
? ??????? ???????????. ?????? ??? ???????? ??????? ??????. ??????? ????? ?????? ??????? ? ???????? ?? ?????.
writeln('??????? ?????: ');
read(u);
len := length(u);
???????? ????, ????????????? ?????? ????????? ?????? ???????????????? ??????:
i := 1;
while i <= len do
?????? ?????? ???? ???????? ?? ??, ??? ?? ???????? ???????? ?????. ? ?????? ?????? ??????? ????????? ?????? ?????????? ???????? ?????, ???? ??? ??????? ????? ? ?????????. ????? ??????????? ?? ???????????????? ?????? ???? ?????? ???? ???????????? ? ?????????? ??? ?????? ? ??????? ??????? lowercase. ?????? ??? ??????? ??????????? ??? ?????????????? ????????? ???? ? ????????.
if (lowercase(u[i]) >= 'a') and (lowercase(u[i]) <= 'z') then begin
???? ?????? ???-???? ?????, ?? ??? ?????? ???? ???????? ? ?????????? w, ? ???????????? ?????? ?????. ??????? ?????? ???? ???????? ?? ??????? ? ???, ????? ????? ????????????? ????????? ??????.
w := lowercase(u[i]);
i := i + 1;
????? ???????????? ?????? ??????? ??????? ?????? ???????? ????? while. ???? ?????? ????????????? ??????? ?????, ? ??????? ??? ?? ??????? ????? ???????????????? ??????, ?? ????? ????? ??????????????? ???????????? ?? ??????, ???????? ?????.
while (i <= len) and
((lowercase(u[i]) >= 'a') and
(lowercase(u[i]) <= 'z')) do begin
w := w + lowercase(u[i]);
i := i + 1;
end;
??? ?????? ????????? ???????? ?????????? ???? ???????????. ????? ??????? ?????????, ??? ?? ?????? ??? ??????????????? ????? ? ???????. ???? ???, ?? ??????? ??? ???? ????????.
j := 1;
while (j <= q) and (w<>ws[j]) do
j := j + 1;
if j > q then begin
q := q + 1;
ws[q] := w;
end;
???? ?????? ??? ??? ? ?????? ??????????? ?? ?????? ???????? ?????????, ?? ????????? ???? ??????? ? ?????????? ???????.
else
i := i + 1;
?? ? ? ????? ??????? ?? ??????? ????? ?? ?????.
for i := 1 to q do
writeln(ws[i]);
????????? ?? ????? ???????:
????????? ????????? ????????? ???? ?? ?????? ???????? ???:

var
u: string;
ws: array[1..100] of string;
w: string;
len: integer;
i, j, q: integer;

begin
writeln('??????? ?????: ');
read(u);
len := length(u);

i := 1;

while i <= len do
if (lowercase(u[i]) >= 'a') and (lowercase(u[i]) <= 'z') then begin
w := lowercase(u[i]);
i := i + 1;
while (i <= len) and
((lowercase(u[i]) >= 'a') and
(lowercase(u[i]) <= 'z')) do begin
w := w + lowercase(u[i]);
i := i + 1;
end;
j := 1;
while (j <= q) and (w<>ws[j]) do
j := j + 1;
if j > q then begin
q := q + 1;
ws[q] := w;
end;
end
else
i := i + 1;

for i := 1 to q do
writeln(ws[i]);

end.





Чтобы не видеть здесь видео-рекламу достаточно стать зарегистрированным пользователем.
Чтобы не видеть никакую рекламу на сайте, нужно стать VIP-пользователем.
Это можно сделать совершенно бесплатно. Читайте подробности тут.