XxxzeroxxX's blog

By XxxzeroxxX, history, 4 weeks 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

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by XxxzeroxxX (previous revision, new revision, compare).