Time Complexity and allocated time related confusions

Правка en2, от TaskForce141, 2024-08-20 09:20:50

Hi, I am facing some confusions about the time complexity of the codes we submit. If the time limit per test=1 second,

doesn't that mean if t=3, total 3*1 seconds will be needed at max? I mean maximum 3 seconds in total is available , right?

My submission

According to my calculation, the time complexity of my provided solution is

n*log(a_max), where a_max= max(vector a)

I am confused why it is getting TLE everytime.

And I think I have little knowledge, so asking.

Do enlighten me with your knowledge's lumen.

Thanks

Теги time, c++

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский TaskForce141 2024-08-20 09:20:50 6
en1 Английский TaskForce141 2024-08-20 09:20:00 672 Initial revision (published)