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

建议使用的浏览器:

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

2503:Babelfish

题目描述
You have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a dictionary to help you understand them.
输入解释
Input consists of up to 100,000 dictionary entries, followed by a blank line, followed by a message of up to 100,000 words. Each dictionary entry is a line containing an English word, followed by a space and a foreign language word. No foreign word appears more than once in the dictionary. The message is a sequence of words in the foreign language, one word on each line. Each word in the input is a sequence of at most 10 lowercase letters.
输出解释
Output is the message translated to English, one word per line. Foreign words not in the dictionary should be translated as "eh".
输入样例
dog ogday
cat atcay
pig igpay
froot ootfray
loops oopslay

atcay
ittenkay
oopslay
输出样例
cat
eh
loops
提示
Huge input and output,scanf and printf are recommended.

该题目是Virtual Judge题目,来自 北京大学POJ

源链接: POJ-2503

最后修改于 2020-10-29T06:34:20+00:00 由爬虫自动更新

共提交 18

通过率 16.67%
时间上限 内存上限
3000 65536