ZOJ 1109 Language of FatMouse
来源:互联网 发布:linux beam.smp 编辑:程序博客网 时间:2024/05/17 23:47
开始学习stl,准备记录下自己每天做的zoj题目。
这题用map类解起来并不困难,对字符串处理时用了substr。
题目连接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=109
#include<iostream>#include<map>#include<vector>#include<string>#include<stdio.h>using namespace std;int main(){string s;string s1,s2;char c[100];int npos;map<string,string> fat;map<string,string>::iterator iter;while(gets(c)){s.assign(c);if(s.size()==0)break;npos=s.find(' ');s1=s.substr(0,npos);s2=s.substr(npos+1);fat[s2]=s1;}while(gets(c)){s.assign(c);iter=fat.find(s);if(iter!=fat.end())cout<<fat[s]<<endl;elsecout<<"eh"<<endl;}return 0;}
- ZOJ 1109 Language of FatMouse
- zoj 1109 Language of FatMouse
- ZOJ 1109Language of FatMouse
- 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
- 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
- zoj 1109 Language of FatMouse
- ZOJ 1109 Language of FatMouse
- zoj 1109 Language of FatMouse 【字典树】
- ZOJ 1109 Language of FatMouse 【STL】
- ZOJ Problem Set - 1109 Language of FatMouse
- 第九天 CSS表单设计
- 开源软件下载地址
- Apple Sample代码摘抄-plist文件加载
- Poj 1708 Game (BFS)
- 该怎么样去选方向?(软件开发还是软件测试?)
- ZOJ 1109 Language of FatMouse
- 《学习OpenCV》练习题第四章第三题a
- webkit真正可以编译的过程
- 给ActiveX控件授权,加数字签名
- 开源项目之Android RibbonMenu(导航菜单)
- stl中的heap使用
- Joomla 3.x_component如何打包安装和卸载
- 我的敏捷思想成长之旅
- 十天学会DIV+CSS第十天 div+css网页标准布局实例教程