hdu 1075 What Are You Talking About
来源:互联网 发布:电脑中文编程语言视频 编辑:程序博客网 时间:2024/05/16 00:34
#include <iostream>#include <cstdio>#include <string>#include <map>using namespace std;int main(){ map<string, string>th; string a, b; string::size_type i, len; map<string, string>::iterator ite; getline(cin, a); th.clear(); while(1){ cin>>a; if(a!="END"){ cin>>b; th[b] = a; } else break; } /*for(ite=th.begin(); ite!=th.end(); ite++) cout<<ite->first<<' '<<ite->second<<endl;*/ getline(cin, a); getline(cin, a); while(1) { getline(cin, a); b.clear(); if(a!="END") { len = a.size(); for(i=0; i<len; i++) { if( isalpha(a[i]) ) b += a[i]; else{ if( b.empty()!=true ) { if( th.count(b)!=0 ) cout<<th[b]<<a[i]; else cout<<b<<a[i]; //注意输出a[i]; b.clear(); //注意清空b } else cout<<a[i]; } } printf("\n"); } else break; } return 0;}
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
- [linux device driver] Chapter 03:scull_load脚本理解
- 例程codegen功能之一:限制软件的使用期限
- hdu 1029 Ignatius and the Princess IV //map的使用
- 黑马程序员_Java_Collection
- 数论四大定理
- hdu 1075 What Are You Talking About
- Vim配置目录结构
- 金明的预算方案
- hdu 5182 水题
- hdu 1263 水果
- Android Studio 快捷键 (OSX)
- 黑马程序员——Java多线程2
- Vim中的buffer, window, tab
- 网易云课堂《Linux内和分析》汇编分析和寻址方式小结(一)