Stendhal's blog

By Stendhal, history, 5 years ago, In English

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 !!!

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

| Write comment?
»
5 years ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

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.

»
5 years ago, # |
Rev. 2   Vote: I like it +9 Vote: I do not like it

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