Uva10815——Andy's First Dictionary
2015-10-24 20:32
309 查看
#include <iostream> #include <string> #include <set> #include <sstream> using namespace std; set<string> dict; int main() { // freopen("10815.txt", "r", stdin); 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 << endl; return 0; }
相关文章推荐
- BCGcontrolBar(八) Ribbon图标变换
- C语言 概念整理 第一章 我梦老师倾情奉献
- window.location js截取url地址
- 《rsync同步的艺术》–linux命令五分钟系列之四十二
- asp中把数据导出为excel的几种方法
- UitableView的增删和移动
- nmap的使用2
- Android Studio加入百度地图功能
- 1051: [HAOI2006]受欢迎的牛
- linux系统下的qt5安装
- Uva156——Ananagrams
- MYSQL数据库
- C++ 多态的实现机制
- JQuery01
- LightOJ 1005 Rooks 【排列组合】
- avc格式
- Linux - Ubuntu14.04 wifi 信号 找不到
- 使用cocoapods管理第三方库RestKit遇到的问题
- OC01 类和对象 作业1
- Codeoforces 558 B. Duff in Love 【 Codeforces Round #326 (Div. 2)】