kambingjantan's blog

By kambingjantan, history, 8 years ago, In English

Hi guys. I just tried to solve the recent ICPC Singapore problem G with DP bottom up. The summary of description is like this :

Given sequence with length N < 3000 with each in range 1 and 109. Find the maximum partition can be made with each sum of partition elements cannot bigger than sum of elements on the right partition

My answer is by make table DP[i, j] contains maximum partition can be made from element [1, j] with last partition covers [i, j]. And then fill the table with DP[i, j] = max{DP[k, i - 1]} + 1 if only Sumk, i - 1 ≤ Sumi, j

My solution

Are there any flaws with my approach?

Full text and comments »

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

By kambingjantan, history, 8 years ago, In English

Any problem with the web now?

Full text and comments »

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