当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

1230:Compound Words

题目描述

You are to find all the two-word compound words in a dictionary. A two-word compound word is a
word in the dictionary that is the concatenation of exactly two other words in the dictionary.

输入解释

Standard input consists of a number of lowercase words, one per line, in alphabetical order. There will
be no more than 120,000 words.

输出解释

Your output should contain all the compound words, one per line, in alphabetical order.

输入样例
a
alien
born
less
lien
never
nevertheless
new
newborn
the
zebra
输出样例
alien
newborn

该题目包含在题集 ACM赛制

题目来源 19 June

共提交 3

通过率 100.0%
时间上限 内存上限
1000 MS 128 MB