#include
#include
#include
using namespace std;
bool shorted(const string &s1,const string &s2)
{
return s1.size()<= s2.size();
}
bool gt6(const string &s)
{
return s.size()>= 6;
}
int main()
{
string word;
vector vect;
cout<<"输入字符串:";
while(cin>>word)
vect.push_back(word);
sort(vect.begin(),vect.end());
vector::iterator iter=unique(vect.begin(),vect.end());
vect.erase(iter,vect.end());
stable_sort(vect.begin(),vect.end(),shorted);
size_t wc=count_if(vect.begin(),vect.end(),gt6);
cout<<"长度不小于6的字符串个数有:"<
getchar();
getchar();
return 0;
}
阅读(210) | 评论(0) | 转发(0) |