590

 

1645

 

473

This solution is based on 0/1 knapsack problem. dp[i][j][k] is the maximum amount of songs with i songs while k unit time is left in disk j.

10943

 

10616

 

10721

 

166

 

10912

 

116

 

 

10910

Top Down: