Пожалуйста, подпишитесь на официальный канал Codeforces в Telegram по ссылке https://t.me/codeforces_official. ×

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

Автор 2048, 8 лет назад, По-английски

Can any one help me. I'm trying to solve GSS1 problem on Spoj !! Using Segment Tree and I'm Getting Wrong Answer. I'm really have no idea , Here is my Code

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

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

when you are merging , answer is not always max of left and right subtree . sometimes, you can choose some part of the Left subtree and some part of the right subtree :)