aza-zil's blog

By aza-zil, history, 5 years ago, In English

Hey!

So I am trying to solve 1187D - Subarray Sorting, 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 :)

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?