集合set练习:Andy's First Dictionary(UVa 10815)代码
来源:互联网 发布:小米路由器域名重定向 编辑:程序博客网 时间:2024/06/06 10:53
《算法竞赛入门经典(第2版》例题5-3
#include <iostream>#include <string>#include <set>#include <sstream>using namespace std;set<string> dict; // string集合 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) dict.insert(buf);} for(set<string>::iterator it = dict.begin(); it != dict.end(); ++it)cout << *it << "\n";return 0;}
0 0
- 集合set练习:Andy's First Dictionary(UVa 10815)代码
- UVa - 10815 - Andy's First Dictionary(STL - 集合set)
- Andy's First Dictionary(uva 10815) set用法
- UVA 10815 Andy's First Dictionary(stl,set)
- UVA 10815 Andy's First Dictionary(stringstream,set等)
- UVA 10815 Andy's First Dictionary(set的应用)
- Set操作UVa 10815Andy's First Dictionary
- UVa 10815 Andy's First Dictionary 【STL】【set】
- UVa 10815 Andy's First Dictionary 【set】【字典序】
- uva-10815-Andy's First Dictionary-stl-set
- Andy's First Dictionary(set)
- UVA 10815-Andy's First Dictionary(字符串模拟+排序+重复删除||STL-set)
- 紫书章5例三 Andy's First Dictionary, UVA 10815(set)
- UVa OJ 10815-Andy's First Dictionary
- uva 10815 Andy's First Dictionary
- UVa 10815 - Andy's First Dictionary
- UVA 10815 - Andy's First Dictionary
- uva-10815 - Andy's First Dictionary
- MFC动态画矩形(响应WM_MOUSEMOVE)
- nyoj123士兵杀敌(四)树状数组
- 【DB.Oracle】export/import dmp 文件
- 二叉树之二叉搜索树
- SSL和SSH的区别
- 集合set练习:Andy's First Dictionary(UVa 10815)代码
- 提升网站访问速度的最佳实践
- JAXB转XML: 错误 class nor any of its super class is known to this 的处理
- CoreData For iOS
- CSS3 背景颜色渐变
- JBOSS7搭载EJB3之实体Bean
- java基础
- 求两集合的交集与并集
- 如何在Windows上配置EBS R12.1.3的OAF开发环境