A problem that I don't have any idea how to solve it

Revision en1, by Whistle, 2016-05-25 15:43:27

there are N items and a budget of D dollars
each item has a stock S (you can buy at most S of that item) A, B , and value X
the cost for k of that item is (A + (k-1)* B)
what is the maximum value can be attained given this budget ??
1 <= N <=2000
1<= D <= 5000
1<= X,S <= 10^7
0<= B <= A <= D

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Whistle 2016-05-25 15:43:27 387 Initial revision (published)