upper_bound(multiset.begin(),multiset.end(),x) vs multiset.upper_bound(x) in C++

Revision en1, by Parvej, 2020-04-18 11:14:49

In this problem 1008C - Перестановка массива

I used upper_bound(multiset.begin(),multiset.end(),x) and got TLE.

TLE Sub: 77006832

But when I used multiset.upper_bound(x), I got accepted!

AC Sub:77081261

Can anyone explain to me why inbuilt upper_bound() is slower than the member upper_bound() function of std::multiset?

Tags #multiset, #c++

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Parvej 2020-04-18 11:14:49 434 Initial revision (published)