/*************************************************************************
> File Name: exam1013.cpp
> Author:keson
> Mail:keson@bupt.edu.cn
> Created Time: 2015年01月21日 星期三 18时29分27秒
************************************************************************/
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
bool isMoreThanFive(const string &s)
{
return (s.size()>=5?1:0);
}
int main()
{
vector<string> words;
string word;
cout<<"Enter the string :"<<endl;
while(cin>>word)
{
words.push_back(word);
}
cin.clear();
cout<<endl;
auto end_true=partition(words.begin(),words.end(),isMoreThanFive);
auto beg=words.begin();
while(beg!=end_true)
{
cout<<*beg++<<" ";
}
}