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

Help to know why I'm getting TLE

Revision en2, by aza-zil, 2019-07-22 10:24:21


So I am trying to solve 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 : 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 :)


  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)