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
Slyar:题目大意很简单,就是给你字典的对应信息,然后给你待查询词语,要求你输出字典查询结果,如果字符串没有在字典中则输出"eh"。
分享到:
相关推荐
pku acm 2752 Seek the Name, Seek the Fame代码 kmp算法。解题报告:http://blog.csdn.net/china8848
Pku acm 第1163题 The Triangle 代码,有详细的注释,动态规划
2006年 Jan-April 的期号包含了当年前三个月的期刊内容,这些期号的文件名分别为:Communications of the ACM 200604.pdf、Communications of the ACM 200601.pdf、Communications of the ACM 200603.pdf、...
Communications of the ACM is the flagship publication of the ACM and one of the oft-cited magazines in the computing field. Established in 1957 as a vehicle for ACM members to communicate their ...
pku acm 1274 The Perfect Stall 代码 二分图的最大匹配的匈牙利算法 解题报告请访问:http://blog.csdn.net/china8848
pku acm 1050 To the Max代码,有详细注释,动态规划
标题 "Searching Words (acm题)" 指的是一道在 ACM(国际大学生程序设计竞赛)中出现的问题。这类题目通常需要参赛者运用计算机科学的基本原理,如算法和数据结构,来解决特定的编程挑战。描述中提到的是作者为帮助...
The first value in a pair, s, is the speed in miles per hour and the second value, t, is the total elapsed time. Both s and t are integers, 1 <= s <= 90 and 1 <= t <= 12. The values for t are always ...
ACM PRO ACM PROACM PRO ACM PROACM PRO ACM PRO
是一道动态规划的基础题。
ACM(Association for Computing Machinery)程序设计大赛是全球范围内一项极具影响力和权威性的大学生编程竞赛,由美国计算机协会(ACM)主办。国际大学生程序设计竞赛(ICPC,International Collegiate ...
美国计算机权威期刊《communications_of_the_ACM》文章翻译_ComputationalThinking
【标题】"acm试题答案acm" 涉及的主要知识点是ACM(国际大学生程序设计竞赛,International Collegiate Programming Contest,简称ICPC或ACM/ICPC)的解题策略与技巧,以及如何寻找和理解比赛题目答案。ACM是一项...
Find an efficient algorithm that examines a string of these symbols, say bbbbac, and decides whether or not it is possible to parenthesize the string in such a way that the value of the resulting ...
### ACM程序设计基础知识点 #### 一、ACM竞赛概览 - **组织机构与活动**: 本课程由东北林业大学陈宇老师负责,通过邮箱Lg_chenyu@yahoo.com.cn进行联系。课程的主要目的是介绍ACM程序设计的基础概念及入门技巧。 - ...
ommunications of the ACM is the flagship publication of the ACM and one of the oft-cited magazines in the computing field. Established in 1957 as a vehicle for ACM members to communicate their ...
"acmacm经典题库"是一个专门为ACM(国际大学生程序设计竞赛,International Collegiate Programming Contest)参赛者准备的学习资源集合。ACM竞赛是全球范围内影响力极大的编程比赛,旨在提升大学生的算法设计、问题...
Computations In Algebraic Geometry with Macaulay 2 Editors: D. Eisenbud, D. Grayson, M. Stillman, and B. Sturmfels
ACM练习建议 ACM练习建议 ACM练习建议