题意:有n个商品,每个商品都有一个付款时间t,和一个价值p,付款的时候可以偷走一个东西,花费1时间....
问所以商品获得后最少要花多少钱...
转换一下啊思路,这题就是已知一个商品单价p,同时送t个物品,即p元可以买t+1个商品,问n个商品买完,至少要花多少钱...
操蛋,想了一天,最后还是看题解才搞定的...
那么其实很简单,就是一个01
背包问题
Description
Bob came to a cash & carry store, put n items into his trolley, and went to the checkout counter to pay. Each item is described by its price ci and time ti in seconds that a checkout assistant spends on this item. While the checkout assistant is occupied with some item, Bob can steal some other items