hdu 1113 Word Amalgamation
来源:互联网 发布:tl-wn725n linux 编辑:程序博客网 时间:2024/05/21 06:25
字符串排序,map的顺序预览
#include<iostream>#include<algorithm>#include<map>using namespace std;string str,s;map<string,string>mapp;int main(){while(cin>>str&&str!="XXXXXX"){s=str;sort(s.begin(),s.end());mapp[str]=s;}while(cin>>str&&str!="XXXXXX"){s=str;sort(s.begin(),s.end());int flag=1;for(map<string,string>::iterator it=mapp.begin();it!=mapp.end();it++){if(it->second==s){cout<<it->first<<endl;flag=0;}}if(flag) cout<<"NOT A VALID WORD"<<endl;cout<<"******"<<endl;}return 0;}
0 0
- HDU 1113 Word Amalgamation
- hdu 1113 Word Amalgamation
- hdu(1113)Word Amalgamation
- HDU 1113 Word Amalgamation
- hdu 1113 Word Amalgamation
- HDU 1113 Word Amalgamation
- HDU 1113-Word Amalgamation
- hdu 1113 Word Amalgamation
- hdu 1113 Word Amalgamation
- hdu 1113 Word Amalgamation
- hdu-1113 Word Amalgamation
- HDU 1113 Word Amalgamation
- HDU 1113 Word Amalgamation
- hdu 1113 Word Amalgamation (map)
- HDU 1113--Word Amalgamation【map】
- HDU 1113 — Word Amalgamation
- HDOJ HDU 1113 Word Amalgamation
- HDU 1113 Word Amalgamation 《map》
- ubuntu 14.04 安装gensim
- Spring MVC 教程,快速入门,深入分析
- 模糊数学
- Timer实现定时执行
- 媒体库管理系统即图书馆管理系统设计
- hdu 1113 Word Amalgamation
- LeetCode Bitwise AND of Numbers Range
- ffmpeg使用小结
- 程序员技术练级攻略
- Java编程中“为了性能”需做的26件事
- NodeJS学习_1
- Java网络编程初识----URL和InetAddress
- Objective-C高级编程——KVC(一)
- Java程序员从笨鸟到菜鸟之(七十九)细谈Spring(八)spring+hibernate整合基本详解