Работают на основе Binary search (двоичный поиск), поэтому требуют отсортированного массива
lower_bound(v.begin(), v.end(), variable) // returns first value that equals or greater than specified variable
upper_bound(v.begin(), v.end(), variable) // returns last value that equals or less than specified variable