Need help on DP problem

Revision en1, by singh1495, 2019-07-09 21:21:14

Given N stacks, each stack contains Si elements, find the maximum sum of the M numbers in the N stacks. To get the number of the stack, only supporting get the top number. For example, S=[1,200,1,2,3], if you want to get the number 200, you need choose 3,2,1 first. EX: S1=[1,1,100,3] S2=[2000,2,3,1] S3=[10,1,4] the maximum sum of the 3 numbers in the above stacks is 3+100+4=107. Any better solution for this problem?


  Rev. Lang. By When Δ Comment
en1 English singh1495 2019-07-09 21:21:14 458 Initial revision (published)