lower_bound and upper_bound usage

Revision en1, by 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)?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English PerryThePlaytypus 2023-03-20 11:42:16 358 Initial revision (published)