Getting TLE for using upper_bound in BOX FITTING.

Revision en1, by im_mortal79, 2021-03-30 04:06:44

In the problem B of recent codeforces contest. I am using function upper_bound whose complexity is logn,but is still getting TLE see this 111426754 but after some minute changes in the code it got accepted see this 111426808 Now,I am not able to understand what is the difference in above codes. Please help me undestand.

Thanks in advance.

Tags #binary search, upper_bound, #multiset

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English im_mortal79 2021-03-30 04:06:44 422 Initial revision (published)