| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 1024 MB | 25 | 21 | 16 | 88.889% |
For some reason, when Paul’s essay was saved, all of the spaces disappeared. He does not want to re-add all of his spaces so he decided to make a program that will, given a dictionary of words, add the spaces in the right places. There will only be one configuration of spaces that will correctly separate the words.
The first line of input will contain a single integer n that indicates the number of words in the dictionary.
The following n lines will be the words that are in the dictionary of possible words.
The rest of the input will be the collection of characters that must be spaced out correctly. In the data file this will be on one line.
Output the zero-based index positions of the spaces in the final essay.
12 there is nothing i an and a the now know sure do thenowisnothingandisuredoknowtheis
3 7 10 18 22 24 29 32 37 41