题目描述:
#include<iostream>
#include<string>
#include<set>
#include<sstream>
using namespace std; set<string> dic;
string s, buf; int main() {
while(cin >> s) {
for(int i = ; i < s.length(); i++)
if(isalpha(s[i])) s[i] = tolower(s[i]); else s[i] = ' ';
stringstream ss(s);
while(ss >> buf) dic.insert(buf);
}
for(set<string>::iterator it = dic.begin(); it != dic.end(); ++it)
cout << *it << "\n";
return ;
}