How do you use lower_bound on paired set?

Revision en1, by hwangganzi, 2019-11-15 10:56:11

I want to find a pair that both first and the second value are bigger than s.lower_bound({a,b})

for example ~~~~ set<pair<int,int>> s; s.insert({50, 40}); s.insert({100, 20}); s.insert({120, 80}); auto it = s.lower_bound({80 , 60 }); ~~~~ if I do like this, iterator will find pair({100,20}). But What I want is pair ({120, 80}) because both first and the second value are bigger than ({80, 60}). for ({100, 20}) the first value is bigger than 80 but the second value is smaller than 60. This is not what I want. Sorry for my bad english, Thank you in advance.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English hwangganzi 2019-11-15 10:56:11 614 Initial revision (published)