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

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

Hello everyone! I am new to competitive programming. (I just started 3 days ago and today i gave my first contest)
it might be probably because I am brain ded but I am unable to understand what is xi and how we are choosing it in the problem (Musical Rods which is the 7th problem in division 4) — Link of the problem.
I am unsure how and where to ask such doubts in Codechef so I thought to make a blog here

Also as everyone is thanking the person who helped them come into competitive programming i would like to thank youtube for recommending me SecondThread's video about 4 days back! I am learning java because of him will try to improve as much as possible :)


(I cant draw :| )

ashibh thx for answering. I cant post images in comments yet so I have to write like this:
so this is what i understood tell me where i am wrong?
4
2 8 9 11
25 27 100 45
this is one of the sample test case where they took
order : 2->4 -> 3-> 1
so according to me following this order


but this doesnot match the x1 values they gave

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

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

The problem is actually very similar to a recent AtCoder problem the editorial of which you can see here.

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

Basically, Xi is the starting position of every rod starting from 0 as the origin, we arrange rods in such a way that the sum of xi(distance from the origin)*Bi(beauty) becomes maximum hope you get the intuition. :)