|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||128 MB||2||2||2||100.000%|
We are given a word w being a pattern and a finite sequence of nonempty words C = (w1, ..., wk). In the sequence C one should indicate words which form the pattern when concatenated in the same order as they appear in the sequence C. The answer is an increasing sequence of numbers of words of the given sequence C, which form the pattern after concatenation. The pattern w and each word in the sequence C consist of at most 150 small letters of English alphabet from 'a' to 'z' and contain no diacritics. The number of words in the sequence is positive and not greater then 200.
The pattern rytter can be formed from the words of the sequence C = (ry, r, yt, y, tt, t, e, te, r, er) choosing successively and concatenating the words numbered (2, 4, 5, 7, 9). The choice (1, 5, 10) is another way to obtain the same pattern.
Write a program that:
In the output one should write:
rytter 10 ry r yt y tt t e te r er
9 2 4 5 7 9