Analysis of the following integer program So the knapsack problem has an integer programming formulation as follows,

$$ \max_x v\cdot x\\s.t \\x_i \in \{0,1\}\\w\cdot x \leq C$$

Now consider the second integer program which might be a variation of the knapsack integer program.

$$ \max_x v\cdot x\\s.t \\x_i \in \{0,L_i\}\\  x_i \leq R \cdot \delta_i\\ \delta_i  \in  \{0,1\}\\ \sum_i \delta_i = k$$
where $v_i$ is item's $i$ value, $L_i$ and $k$ are constants, and $R = \max{\{L_1,L_2,...L_d\}}$.


Is there a dynamic programming solution or an approximation algorithm
for the second integer programming problem ?
Is it possible to use the solution of the knapsack problem to warm
start or partially solve the second integer programming ?


Thanks!
A simple greedy approach works here: choose the $k$ elements having maximal $v_i L_i$.