Why set::lower_bound() and std::lower_bound() function does not work the same?

Правка en3, от Lix2002, 2023-10-23 16:27:03

Well I just found this wierd thing when I was doing the problem Codeforces Round 905 (Div. 3) Prob.D When I use std::find(set.begin(), set.end(), value) or std::lower_bound(set.begin(), set.end(), value), I would get a TLE. But instead of using that, when I replace them with set.find(value) or set.lower_bound(value) it passed smoothly and worked as expected. Why would this happened? Is there any difference between these two approaches?

Теги lower_bound, find, multiset

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский Lix2002 2023-10-23 16:27:03 13 Tiny change: 'it passed and worke' -> 'it passed smoothly and worke' (published)
en2 Английский Lix2002 2023-10-23 16:26:28 12
en1 Английский Lix2002 2023-10-23 16:25:59 560 Initial revision (saved to drafts)