亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb

首頁 > 學院 > 開發設計 > 正文

hdu1075【map】

2019-11-14 10:40:10
字體:
來源:轉載
供稿:網友

What Are You Talking About

Time Limit: 10000/5000 MS (java/Others) Memory Limit: 102400/204800 K (Java/Others) Total Submission(s): 21610 Accepted Submission(s): 7200

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 START from fiwo hello difh mars riwosf earth fnnvk like fiiwj END START difh, i’m fiwo riwosf. i fiiwj fnnvk! END

Sample Output hello, i’m from mars. i like earth!

代碼:

#include <iostream>#include <string>#include <cstring>#include <cstdio>#include <cmath>#include <cstdlib>#include <algorithm>#include <queue>#include <map>#define MST(s,q) memset(s,q,sizeof(s))#define INF 0x3f3f3f3f#define MAXN 1005using namespace std;map<string, string> Dictionary;int main(){ string s; char key[20], value[20]; cin >> s; while (scanf("%s", key)) { if (strcmp(key, "END") == 0) break; scanf("%s", value); Dictionary[value] = key; } cin >> s; int start, sign; getchar(); while (getline(cin, s)) { if (s == "END") break; sign = 0; for (int i = 0; i < s.size(); i++) { if (s[i] >= 'a' && s[i] <= 'z') { if (sign == 0) start = i, sign = 1; if (i == s.size() - 1) // 如果最后一個字符不是標點符號 { string temp(s, start, i - start + 1); map<string, string>::iterator it = Dictionary.find(temp); if (it == Dictionary.end()) { cout << temp; } else cout << Dictionary[temp]; } } else { if (sign == 1) { string temp(s, start, i - start); map<string, string>::iterator it = Dictionary.find(temp);// 在字典里尋找單詞 if (it == Dictionary.end()) // 未找到 { cout << temp; } else cout << Dictionary[temp]; // 找到了 sign = 0; } printf("%c", s[i] ); } } printf("/n"); }}
上一篇:JAVA多線程 淺入Concurrent包

下一篇:jstl

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb
国产成人+综合亚洲+天堂| 欧美有码在线视频| 国产91成人video| 亚洲人成电影网站色www| 亚洲精品suv精品一区二区| 亚洲国产成人在线视频| 亚洲最大福利网站| 国产精品久久一| 久久久成人av| 久久久久久久久久久人体| 午夜精品美女自拍福到在线| 久久伊人色综合| 中文字幕亚洲精品| 亚洲综合日韩中文字幕v在线| 国产精品免费一区二区三区都可以| 大伊人狠狠躁夜夜躁av一区| 欧美亚洲另类视频| 久久噜噜噜精品国产亚洲综合| 日韩小视频网址| 色小说视频一区| 精品国内产的精品视频在线观看| 国产精品久久久久久久久久久久| 人九九综合九九宗合| 久久久亚洲精选| 亚洲一区二区国产| 日韩av大片在线| 国产精品夜色7777狼人| 成人av在线亚洲| 欧美日韩国产一区中文午夜| 在线免费观看羞羞视频一区二区| 色av吧综合网| 久久久噜噜噜久久久| 中文字幕在线看视频国产欧美在线看完整| 日韩a**中文字幕| 69国产精品成人在线播放| 欧美精品久久久久久久免费观看| 亚洲黄色有码视频| 麻豆国产va免费精品高清在线| 中文字幕国产日韩| 久久天天躁狠狠躁夜夜躁2014| 亚洲第一区中文字幕| 欧美精品免费播放| 国产精品久久久久7777婷婷| 成人444kkkk在线观看| 中文字幕久精品免费视频| 日韩风俗一区 二区| 国产91久久婷婷一区二区| 国产精自产拍久久久久久| 伊人久久久久久久久久久久久| 777精品视频| 国产色婷婷国产综合在线理论片a| 在线播放国产一区中文字幕剧情欧美| 91色视频在线导航| 日本精品视频网站| 全色精品综合影院| 久久久国产在线视频| 欧美日韩国产色| 欧美精品在线观看| 亚洲美女视频网站| 欧美精品久久久久久久| 国产精品91视频| 久久久久中文字幕| 青草青草久热精品视频在线网站| 亚洲美女精品成人在线视频| 欧美激情在线有限公司| 国产极品精品在线观看| 亚洲r级在线观看| 欧美成人午夜激情在线| 国产精品一区二区三区久久| 国产精品成人品| 欧美日韩不卡合集视频| 久久精品视频在线观看| 精品国产91乱高清在线观看| 日韩美女在线播放| 在线播放国产一区二区三区| 不卡av在线播放| 久久精品视频在线观看| 亚洲va久久久噜噜噜| 日韩欧美在线免费观看| 亚洲一区美女视频在线观看免费| 国产精品老女人精品视频| 午夜剧场成人观在线视频免费观看| 中文字幕免费精品一区| 欧美性猛交xxxx久久久| 欧美亚洲另类激情另类| 欧美高清在线观看| 久久久国产一区二区| 欧美日韩中国免费专区在线看| 日韩中文字幕在线| 2019中文在线观看| 国产欧美日韩丝袜精品一区| 青草青草久热精品视频在线观看| 国产精品日韩在线一区| 久久久www成人免费精品| 91综合免费在线| 中文字幕日韩在线播放| 日韩在线观看免费av| 日韩欧美在线观看视频| 伊人成人开心激情综合网| 亚洲天堂网在线观看| 亚洲激情在线观看视频免费| 久久国产精品久久久久久久久久| 精品视频9999| 国语自产精品视频在线看抢先版图片| 国产成人高清激情视频在线观看| 欧美一级黄色网| 精品国产福利视频| 欧美精品少妇videofree| 欧美一级视频免费在线观看| 国产日韩精品在线观看| 亚洲影院污污.| 亚洲一区二区三区四区在线播放| 久久久亚洲福利精品午夜| 国产欧美精品一区二区三区介绍| 色妞久久福利网| 亚洲日本aⅴ片在线观看香蕉| 欧亚精品在线观看| 成人精品久久久| 2023亚洲男人天堂| 国产精品综合不卡av| 亚洲国内精品在线| 亚洲网站在线观看| 欧美在线一区二区三区四| 亚洲国产精久久久久久久| 国产一区二区三区四区福利| 久久99久久99精品中文字幕| 国产精品久久久| 96精品视频在线| 欧美成年人在线观看| 日韩国产高清视频在线| 国产欧美日韩视频| 欧美成人性生活| 日韩av综合网| 欧美黑人xxxⅹ高潮交| 神马久久久久久| 欧美在线免费看| 久久久久久亚洲精品不卡| 国产成人啪精品视频免费网| 欧美孕妇毛茸茸xxxx| 亚洲精品综合精品自拍| 午夜免费日韩视频| 国产美女精彩久久| 欧美激情va永久在线播放| 日韩电影中文字幕| 久久免费精品日本久久中文字幕| 久久久久久国产三级电影| 亚洲电影第1页| 精品国产91乱高清在线观看| 精品国产区一区二区三区在线观看| 日韩av中文字幕在线免费观看| 亚洲欧美日韩在线高清直播| 欧美日韩电影在线观看| 久久久人成影片一区二区三区| 欧美成人午夜激情视频| 亚洲女人天堂视频| 欧美性生交xxxxxdddd| 91色琪琪电影亚洲精品久久| 欧美夫妻性生活视频| 日韩视频亚洲视频| 欧美国产日韩视频| 亚洲电影免费在线观看| 欧美性xxxxxxxxx| 中文字幕欧美在线| 国产精品第七十二页|