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

Правка en1, от Parvej, 2020-04-18 11:14:49

In this problem 1008C - Reorder the Array

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?

Теги #multiset, #c++

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Parvej 2020-04-18 11:14:49 434 Initial revision (published)