SuperMo's blog

By SuperMo, history, 3 days ago, In English

Hi in problem B of last contest the answer is ∑(pi−ai)+max(pi−ai) now I don't get the max(pi−ai) part I know what it's but I don't know how did we derive it can someone help ?

Full text and comments »

  • Vote: I like it
  • +3
  • Vote: I do not like it

By SuperMo, 4 days ago, In English

Hi, in problem C of the last educational round, why is it wrong to loop from 1 to n and increase the minimum if both are equal to 1, and decrease the maximum if both are -1?

How did so many people know that this was wrong and decide to first calculate the guaranteed rating of the first movie and the guaranteed rating of the second movie, and only then apply the greedy algorithm of decreasing the maximum and increasing the minimum? What is the difference, and how can I notice it?

Full text and comments »

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

By SuperMo, history, 3 weeks ago, In English

in problem F the binary search approach why is this equation wrong with large numbers but it works with small numbers

number of time we use current attack = ceil(mid/(c[i]+1))

Update : it's because of the cool down you don't need to wait c[i] round to hit again you actually wait c[i]-1 round so ceil(mid/c[i]) is correct

Full text and comments »

  • Vote: I like it
  • -10
  • Vote: I do not like it