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