#P1628. 合并序列
合并序列
Description
Given words and a string , output all words that have as a prefix, in lexicographical order.
Input Format
The first line contains a positive integer . The next lines each contain one word, with length at most . The last line contains the string .
Output Format
Output all such words in ascending lexicographical order.
6
na
no
ki
ki
ka
ku
k
ka
ki
ki
ku
Hint
Constraints
- For of the testdata, .
- For of the testdata, and all characters are lowercase letters.
Translated by ChatGPT 5
京公网安备 11011102002149号