hellishere's blog

By hellishere, history, 8 years ago, In English

How to solve code jam Practice Round APAC test 2017 question 4 "sum of sums "using binary search".pls guys help me out link to the question:https://code.google.com/codejam/contest/5254486/dashboard#s=p3 does a segment tree solution to the problem exist pls elaborate a little bit cause i am a noob

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

How to solve problem C ?

  • »
    »
    8 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Take out probability of i th bit being 1 multiply it with 2i and sum over all bits