The problem lies in finding an element equal to x or the minimal element of a larger x in a sorted vector (array). Bust does not suit me. I thought to use binary search, but how?
PS It is not necessary to write about binary search, all that will go through faster than searching. Thank you in advance!