HDU 1075 What Are You Talking About
来源:互联网 发布:手机拍摄特效软件 编辑:程序博客网 时间:2024/06/06 02:06
思路:用的map水过去了。。。其实应该是字典树裸题
#include<bits\stdc++.h>using namespace std;map<string,string>mp;char str[3000];int main(){ string a,b; cin >> a; while(cin >> a) { if(a=="END") break; cin >> b; mp[b]=a; } cin >> a; getchar(); while(1) { gets(str); if(!strcmp(str,"END")) break; int len = strlen(str); a = ""; for(int i = 0;i<len;i++) { if(islower(str[i])) a+=str[i]; else { if(mp.find(a)!=mp.end()) cout << mp[a]; else cout << a; a=""; cout << str[i]; } } cout << endl; }}
0 0
- 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
- 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
- QT中文字体的显示方法
- c语言中出现左操作数必须是左值(摘抄)
- 在CSDN中添加友情连接
- iOS--- 初识Swift小结
- Eclipse报错: “this compilation unit is not on the build path of a java project”,同时按住Ctrl左击不跳转问题
- HDU 1075 What Are You Talking About
- 【教她写代码】使用Intellij创建第一个Springboot程序
- Web容器
- 单调队列HDU 4374 One hundred layer
- yii2框架-composer的自动加载(二)
- QT中QPF字库的制作与旋转字体的实现
- scala学习14之scalatest中的intercept使用
- 结构体模版
- 冒泡排序简易代码