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

Автор subbu988, история, 3 года назад, По-английски

I am trying to solve a SegTree Problem, I've written an O(N,lgN) segment tree solution using segment tree. With the given constraints I see that this approach passes For example the solution here passes the problem. I've seen that the verdict of this problem differed from TLE to AC considering memset() for each test case, usage of printf, scanf vs cin/cout and \n instead of endl. I couldn't differentiate between these two solutions and the reason the latter passes and the former results in TLE. Can someone help with this?

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

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

Look at this. Near a TL(3.96), I think its just a bad problem(with so many queries).

  • »
    »
    3 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Thanks for the reply, Did you passed the problem with the changes in the link in 3.96? (Are you buyolitsez?). I made the changes you made and still is a TLE and I don't see difference in the tweak?