10815
来源:互联网 发布:java常用算法手册 编辑:程序博客网 时间:2024/06/04 19:18
紫书上例题5-3,书上题解很详细,在这不说,注意一下 stringstream(最好查一下);
#include <iostream>#include <set>#include <sstream>using namespace std;set<string>str;int main(){ string s,buf; while(cin>>s){ for(int i=0;i<s.length();i++){ if(isalpha(s[i])) s[i]=tolower(s[i]); else s[i]=' '; } stringstream ss(s); while(ss>>buf) str.insert(buf); } for(set<string>::iterator it=str.begin();it!=str.end();++it ) cout<<*it<<"\n"; return 0;}
0 0
- 10815
- 10815
- uva-10815
- uva 10815
- uva 10815
- uva 10815
- uva 10815
- uva-10815
- UVA 10815
- UVa 10815
- UVA 10815
- uva 10815
- uva 10815
- UVA - 10815
- uva 10815
- UVA 10815
- UVa 10815
- UVA - 10815
- ZOJ3202-Second-price Auction
- Eclipse中高亮显示velocity模版页面
- mybatis:Parameter 'list' not found. Available parameters are [templateId, param1, param2, valueList]
- Android GridView长按拖动,删除
- linux task_struct的结构注释
- 10815
- C#遍历DataSet中数据的几种方法总结
- Bootstrap排版
- ML_3_Linear_regression
- [HDU 1226]超级密码:BFS
- 用户登陆记住密码-SharedPreferences实际应用
- mybatis怎么实现对象参数和注解参数同时传入
- 图像融合
- git常用命令汇总