Need help on how to use lower and upper bound stl on vector<pair<int,int>>

Revision en1, by meiniak, 2020-01-05 12:26:55

I got always confused on how to leviate in-built stl function to use upper and lower bound. For eg: in yesterday previous B question I wrote my own upperBound on vector pair.

I think mostly there are 3 variation:

lowerbound on pair with smallest index lowerbound on pair with largest index

upperbound pair with smallest index

Thanx codeforces

Tags #binary search, lower bound, upper_bound, c++ stl

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English meiniak 2020-01-05 12:26:55 488 Initial revision (published)