#include<iostream>
#include<string>
#include<algorithm>
#include<sstream>
#include<set>
using namespace std;
int main()
{
int i=0,j=1;
string a,b;
stringstream ss;
set<string> w;
//freopen("1.txt","r",stdin);
while(getline(cin,a))
{
ss.str(a);
while(ss>>a)
{
b.clear();
//
for(i=0;i<a.size();i++)
{
if(isalpha(a[i]))
{
a[i]=tolower(a[i]);
b+=a[i];
}
else
{
if(b.size())
{
w.insert(b);
b.clear();
}
}
}
if(b.size())
{
w.insert(b);
b.clear();
}
}
ss.clear();
}
for(set<string>::iterator id=w.begin();id!=w.end();id++)
cout<<*id<<endl;
return 0;
}
10815 - Andy's First Dictionary
最新推荐文章于 2022-01-10 15:28:09 发布