杭电 1075 What Are You Talking About
来源:互联网 发布:中国软件登记中心 编辑:程序博客网 时间:2024/06/10 09:45
Problem Description
Ignatius is so lucky that he met a Martian yesterday. But he didn't know the language the Martians use. The Martian gives him a history book of Mars and a dictionary when it leaves. Now Ignatius want to translate the history book into English. Can you help him?
Input
The problem has only one test case, the test case consists of two parts, the dictionary part and the book part. The dictionary part starts with a single line contains a string "START", this string should be ignored, then some lines follow, each line contains two strings, the first one is a word in English, the second one is the corresponding word in Martian's language. A line with a single string "END" indicates the end of the directory part, and this string should be ignored. The book part starts with a single line contains a string "START", this string should be ignored, then an article written in Martian's language. You should translate the article into English with the dictionary. If you find the word in the dictionary you should translate it and write the new word into your translation, if you can't find the word in the dictionary you do not have to translate it, and just copy the old word to your translation. Space(' '), tab('/t'), enter('/n') and all the punctuation should not be translated. A line with a single string "END" indicates the end of the book part, and that's also the end of the input. All the words are in the lowercase, and each word will contain at most 10 characters, and each line will contain at most 3000 characters.
Output
In this problem, you have to output the translation of the history book.
Sample Input
STARTfrom fiwohello difhmars riwosfearth fnnvklike fiiwjENDSTARTdifh, i'm fiwo riwosf.i fiiwj nnvk!END
Sample Output
hello, i'm from mars.i like earth!本体应用一个map容器可以很方便的解答,还有就是字符数组的应用
- 杭电 1075 What Are You Talking About
- 杭电 acm 1075 What Are You Talking About
- 杭电1075 What Are You Talking About
- 杭电1075 What Are You Talking About
- H电-Prolem Archive-1075-What Are You Talking About
- 杭电hdu 1075 What Are You Talking About 字典树的应用
- 杭电1075——What Are You Talking About(字典树应用)
- 杭电acm 1075What Are You Talking About(字典树)
- hdu 1075 What Are You Talking About
- HDU 1075 What Are You Talking About
- HDU 1075 What Are You Talking About
- HDU-1075 What Are You Talking About
- hdu 1075 What Are You Talking About
- hdu 1075 What Are You Talking About
- hdu 1075 What Are You Talking About
- HDU-1075-What Are You Talking About
- HDU 1075 What Are You Talking About
- HDU 1075 What Are You Talking About
- js拖拽
- js 把一个网页设为首页和收藏 只适用ie和火狐
- H.264中CAVLC解码过程详解
- 开发人员必知的20+HTML5技巧
- qt.conf和qtconfig配置Qt运行设定
- 杭电 1075 What Are You Talking About
- 强大的位运算
- 编写高性能 SQL 之一:SQL 中 IN,NOT IN,EXISTS,NOT EXISTS 的用法和差别
- GridView中的数据导出到Excel.并分工作薄显示
- 8-17 仍然报表
- PE文件格式详解(上)
- java classLoader 体系结构
- SOAOFFICE - 微软 OFFICE 中间件 V8.1 下载地址
- getCurrentSession 与 openSession() 的区别 getCurrentSession 与 openSession() 的区别