UVa 10815 - Andy's First Dictionary
2013-04-11 17:17
363 查看
#include <iostream> #include <cstdio> #include <cctype> #include <set> #include <string> using namespace std; char buff[220]; int k_num = 0; int main() { #ifndef ONLINE_JUDGE freopen("in.txt", "r", stdin); #endif typedef set<string, less<string> > myset; myset s; myset::iterator itr; char *p; bool found; int l; char word[20]; while(fgets(buff, sizeof(buff), stdin)) { p = buff; found = false; l = 0; while(*p || found) { if(isalpha(*p)) { found = true; word[l++] = tolower(*p); } else if(found) { found = false; word[l] = 0; s.insert(word); l = 0; } p++; } } for(itr=s.begin(); itr!=s.end(); itr++) cout << *itr << endl; return 0; }
相关文章推荐
- Uva 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
- UVa 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解题报告
- uva 10815 Andy's First Dictionary
- uva 10815 Andy's First Dictionary
- UVa-10815 Andy's First Dictionary
- Problem 030——UVa 10815 - Andy's First Dictionary
- uva10815 Andy's First Dictionary(集合)
- UVA 10815 - Andy's First Dictionary(字符串)
- UVA 10815 - Andy's First Dictionary
- UVa 10815 Andy's First Dictionary
- UVA10815 Andy's First Dictionary
- uva -- 10815 Andy's First Dictionary