Блог пользователя shivanshsingh9670

Автор shivanshsingh9670, история, 20 месяцев назад, По-английски

Question

Submission

I did this question by Segment tree but my solution is throwing TLE. I I think the TC is O(n logn) for larger cases. So I think it should work this way but it is failing. Is it not possible to further optimize it doing this way ?

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится

»
20 месяцев назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

well the segment tree is O(nlg)

but in program it takes the high coefficient cause this you got TLE

try to code better and don't get it :)