#include
#include
#include
#include
using namespace std;
int main()
{
list list1;
list::iterator p, endp;
int i;
for(i=1; i < 20; i++) list1.push_back(i);
p = list1.begin();
while(p != list1.end()) {
cout << *p << endl;
p++;
}
endp = remove_if(list1.begin(), list1.end(),bind2nd(greater(), 4));
p = list1.begin();
while(p != endp) {
cout << *p << endl;
p++;
}
return 0;
}