Изменения рейтингов за последние раунды временно удалены. Скоро они будут возвращены. ×

How to avoid TLE for this problem?

Правка en3, от ryoko1, 2017-04-20 18:42:21

the problem tag is: 796B - Найти кость Here is my sol: 26520634. Another query is that in the above submission when I change my array size from (n+1) to max the OJ gives me TLE on 5th test case. Why is it so? According to my knowledge array creation is a O(1) process and should not affect the time complexity of the program by any means. Your help will be appreciated!!!

Теги #c++, array limit

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский ryoko1 2017-04-20 18:42:21 5
en2 Английский ryoko1 2017-04-20 18:41:30 2 Tiny change: '[problem:769B]\nHere i' -> '[problem:796B]\nHere i'
en1 Английский ryoko1 2017-04-20 18:40:28 419 Initial revision (published)