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

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

Can somebody help me to solve APIO 2019 problem D? . Also it would be nice if you give me all solutions of APIO 2019,this would be helpful for everyone...

Thanks, in advance !!!

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

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

I just solved that problem in O($$$N^2$$$) with dynamic programming. I can send you the code if you want. Now trying to solve it for other subtasks.

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

it is easy to see that the more blocks the less their greatest amount. this means that it is beneficial for us to minimize the amount of the next block. so using this property we can make easy dp. code : https://pastebin.com/7shatgaU