poj2503 -Map
来源:互联网 发布:ubuntu怎么设置ip地址 编辑:程序博客网 时间:2024/06/05 18:13
题目描述:字符串映射
就是以一个字符串为key另一个为Value,让后按key查询
做法:map,可以直接过,不过注意处理常数233
读入大部分用stdio
#include<iostream>#include<map>#include<stdio.h>using namespace std;map<string,string> s;string a,b;char str[30],s1[12],s2[12];int main(){for(;gets(str);s[s2]=s1)if(*str=='\0') break;else sscanf(str,"%s %s",s1,s2);for(;cin>>a;cout<<b<<endl){b=s[a];if(b.length()==0) b="eh";}}
1 0
- POJ2503-map
- poj2503 -Map
- POJ2503--Babelfish--map映射
- poj2503 Babelfish(STL-map)
- POJ2503 Babelfish map做法
- POJ2503 Babelfish【map】
- POJ2503 Babelfish (map)
- Poj2503 map映射使用
- map poj2503 Babelfish
- STL map的使用 POJ2503
- poj2503 map构建字典树
- poj2503(stl, map ,sscanf)
- poj2503 Babelfish(map,二分)
- poj2503查字典 -map或hash
- POJ2503
- poj2503
- poj2503
- POJ2503
- SpringMVC学习——组件解析
- thinkphp,此页面不能重定向
- 梳理android异步通信的概念
- 使用Chrome调试JavaScript的断点设置和调试技巧
- 【机器学习】反向传播神经网络推导
- poj2503 -Map
- Mac上安装CocoaPods
- Android-几行代码通知系统自动安装apk
- 去掉UISegmentedControl的边框颜色
- 制作简单日历
- 【代码积累】Binding的常用写法
- Eclipse中启动tomcat报错java.lang.OutOfMemoryError: PermGen space的解决方法
- C语言 条件编译 总结使用
- 超实用的——BAT面试技巧