acmsguru |
---|
Закончено |
"-"characters. A word is a sequence of Latin letters. The chief librarian asked you to format the text from the document by adding and removing spaces. There are special rules for using the
"-"character in the ancient documents which you need to obey.
"-"character can be used as:
"co-coach".
"-"should be used with a space to the right and to the left. For example,
" -- ".
"-"should be used with a space to the right and to the left. For example,
" -
-- ".
"-"character between words, the words should be delimited by a single space.
"error"without quotes. If there are several solutions, choose any of them.
sample input | sample output |
3 "This is sample -mample " "No solution-" "This is - - --possible test- -" | "This is sample-mample" error "This is -- -- possible test -- " |
Название |
---|