Is allocating too much of memory every time causes TLE in the code?

Revision en1, by NITIN_K_SHUKLA, 2021-11-08 22:06:16

Hello Coders I want to ask one thing that In this question 1592A - Gamer Hemose when I am solving it with using vectors then I got AC you can see my submission 134683722 and when I am solving this with same concepts except here I am using array then I got TLE on test 7 134684129.Why it is happening?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English NITIN_K_SHUKLA 2021-11-08 22:06:16 388 Initial revision (published)