字符题目真是头疼啊,为什么又是WA呢????为什么呢?测试都对啊
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <string>
#include <vector>
#include <set>
#include <cctype>
#include <algorithm>
#include <cmath>
using namespace std;
///
#define INF 0xffffff7
#define MAXN 200
///
set<string, less<string> > words;
int main()
{
///
int i, j, th;
string word;
while (cin >> word)
{
string::iterator pWord = word.begin();
string temp = "";
while (pWord != word.end())
{
if (isalpha(*pWord))
temp += tolower(*pWord);
pWord++;
}
words.insert(temp);
}
set<string, less<string> >::iterator itor = words.begin();
for ( ;itor != words.end(); itor++)
{
cout << *itor << endl;
}
///
return 0;
}