Type: RemoteJudge 1000ms 125MiB

合并序列

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

NN 个单词和字符串 TT,按字典序输出以字符串 TT 为前缀的所有单词。

输入格式

输入文件第一行包含一个正整数 NN

接下来 NN 行,每行一个单词,长度不超过 100100

最后一行包含字符串 TT

输出格式

按字典序升序输出答案。

6
na
no
ki
ki
ka
ku
k
ka
ki
ki
ku

提示

【数据规模】

对于 60%60\% 的数据,满足 1N10001 \le N \le 1000

对于 100%100\% 的数据,满足 1N1000001 \le N \le 100000 且所有字符均为小写字母。

贪心1

Not Claimed
Status
Done
Problem
13
Open Since
2025-11-10 0:00
Deadline
2026-1-31 23:59
Extension
24 hour(s)