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.

Leave a Reply

Your email address will not be published. Required fields are marked *