Please, try EDU on Codeforces! New educational section with videos, subtitles, texts, and problems. ×

Help to know why I'm getting TLE
Difference between en1 and en2, changed 129 character(s)
Hey!↵

So I am trying to solve [problem:1187D], but I am getting **_TLE_**, I believe that my **solve** function is _**O(nlog(n))**_, so can anyone help me get what is so slow in my solution?↵

Here is my solution : [submission:57491327]


**UPD:** I found out the problem, it's because of the memset (again), I needed to fill only n elements not the hole arrays :)

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English aza-zil 2019-07-22 10:24:21 129
en1 English aza-zil 2019-07-22 10:16:31 271 Initial revision (published)