← 返回 coinbase 的题目列表交易费最大化
类型:online_judge
You have N transactions, each with <id, size, fee>. You are given a block size of 100. Fill it with transactions such that the fee is maximized.
You must use a 0-1 Knapsack dynamic programming approach.
Example
Input
transactions = [(1, 50, 60), (2, 30, 40), (3, 20, 50)]
block_size = 100
Output
110