Используйте нижнюю границу в векторе пар

int position = lower_bound(v.begin(),v.end(),{first, -inf})-v.begin();
Bright Batfish