Unexpectedly got TLE in a CF problem

Revision en1, by Fahmid_rng, 2025-10-26 14:04:03

Today I solved this problem 1791F - Range Update Point Query. My first submission:345869729 & second submission:345873398 .

As you can see, those two codes are exactly the same. The only difference is: In first submission, I wrote auto it=lower_bound(all(s),l) & in 2nd submission, I wrote auto it=s.lower_bound(l), where s is a std::set . But, as far I know, both of these functions are of logarithmic time complexity. Then, why did I get TLE in my first submission? Please, explain.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Fahmid_rng 2025-10-26 14:04:03 552 Initial revision (published)