How to avoid TLE for this problem?

Правка en1, от ryoko1, 2017-04-20 18:40:28

the problem tag is: 769B - News About Credit 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 no 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)