you would like to get rid of all the elements in the vector whose value is less than x and that occur after the last value at least as big as y.
vector<int> v;
int x, y;
...
v.erase(
remove_if(v.find_if(v.rbegin(), v.rend(),bind2nd(greater_equal<int>(), y).base(), v.end(), bind2nd(less<int>(), x),
v.end()
);
typedef vector<int>::iterator VecIntIter;
VectIntIter rangeBegin = find_if(v.rbegin(), v.rend(), bind2nd(greater_equal<int>()).base();
v.erase(remove_if(rangeBegin, v.end(), bind2nd(less<int>(), x)), v.end());