POJ - 2503
Description
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
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
Output is the message translated to English, one word per line. Foreign words not in the dictionary should be translated as "eh".
Sample Input dog ogday
cat atcay
pig igpay
froot ootfray
loops oopslay
atcay
ittenkay
oopslay
Sample Output cat
eh
loops
Hint
Huge input and output,scanf and printf are recommended.
|
poj Babelfish 2503 (字符串模拟)
原创
©著作权归作者所有:来自51CTO博客作者mb643f91219020e的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Java-长字符串加密
加密:为你的长字符串提供最高级别的保护!!!
加密算法 JAVA -
POJ2503 Babelfish【map】
题目大意:给你一本字典。字典上每一行为一个英语单词和一个其他国家单词。这样我们就可以通
#include ios 字典树 -
POJ 刷题系列:2503. Babelfish
POJ 刷题系列:2503. Babelfish传送门
java System Babel -
【POJ 2503】 Babelfish
【题目链接】 http://poj.org/problem?id=2503 【算法】 字符串哈希 【代码】
#include ios i++ #define 字符串哈希