TLE on 448C ?

Revision en1, by karishma_gupta, 2020-10-24 13:47:30

https://codeforces.me/contest/448/submission/96518240 I think the complexity is O(n^2) and so, I can't figure out as to why does it TLE? I have been trying to debug it and optimize it for hours. Any help would be appreciated.

Tags #dp, divide and conquer, #greedy

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English karishma_gupta 2020-10-24 13:47:30 239 Initial revision (published)