std::lower_bound vs std::set::lower_bound

Revision en1, by bazsi700, 2017-10-27 23:35:32

I have just discovered, that std::set::lower_bound for larger sets is much-much faster than std::lower_bound.

Can anyone give explanation why does this happen?

Also, use std::set::lower_bound instead of std::lower_bound, I struggled on a problem for like 2 hours because of getting TLE for this.

Tags lower_bound, std

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English bazsi700 2017-10-27 23:35:32 342 Initial revision (published)