ZOJ 1109 Language of FatMouse
2013-03-08 17:33
351 查看
原题链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=109
#include <iostream> #include <fstream> #include <string> #include <map> #include <cstdio> using namespace std; int main() { string s; char ss[100],s1[100],s2[100]; map<string,string>m; map<string,string>::iterator p; while(gets(ss)) { s=ss; if(s=="") break; else { sscanf(s.c_str(),"%s %s",s1,s2); m[s2]=s1; } } while(gets(ss)) { s=ss; p=m.find(s); if(p!=m.end()) cout<<m[s]<<endl; else cout<<"eh"<<endl; } return 0; }
相关文章推荐
- zoj 1109 Language of FatMouse
- ZOJ 1109 Language of FatMouse
- zoj 1109 Language of FatMouse
- zoj 1109 : Language of FatMouse
- ZOJ 1109 Language of FatMouse (trie树)
- ZOJ 1109 Language of FatMouse
- zoj 1109 zoj 1109 Language of FatMouse(字典树)
- ZOJ1109_Language of FatMouse(STL/map)
- zoj1109-Language of FatMouse 字典树
- zoj 1109 Language of FatMouse
- zoj1109 水题(大神绕道) Language of FatMouse
- zoj 1109 Language of FatMouse(map)
- zoj 1109 Language of FatMouse(字典树)
- ZOJ 1109 Language of FatMouse 【STL】
- ZOJ Problem Set - 1109 Language of FatMouse
- ZOJ 1109 Language of FatMouse
- 字典树例题介绍:ZOJ 1109 Language of FatMouse,HDOJ 1075hdoj What Are You Talking About
- zoj_1109 Language of FatMouse
- ZOJ1109 Language of FatMouse,BST
- UVa 10282 / POJ 2503 Babelfish / ZOJ 1109 Language of FatMouse (STL&map)