UVa-10815 - Andy's First Dictionary
算是抄袭代码
#include<iostream>
#include<set>
#include<string>
#include<sstream>
using namespace std;
set<string> dict;
int main()
{
string s,buf;
while(cin>>s)
{
int l=s.size();
for(int i=0;i<l;i++)
{
if(!isalpha(s[i])) s[i]=' ';
else if(isupper(s[i])) s[i]=tolower(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;
}