SuperMo's blog

By SuperMo, history, 10 days 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