lower_bound and upper_bound usage

Правка en1, от PerryThePlaytypus, 2023-03-20 11:42:16

How would I use these functions for pairs? I mean if I have a pair {a,b} and I would like a pair p = {c,d} such that a < c and b < d. The traditional lower_bound and upper_bound functions only give us a pair whose first value 'c' is greater or equal to 'a' and it doesn't care about b and d. Can I get the former in O(logN)?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский PerryThePlaytypus 2023-03-20 11:42:16 358 Initial revision (published)