码迷,mamicode.com
首页 >  
搜索关键字:背包dp    ( 292个结果
poj1787 Charlie's Change
Description Charlie is a driver of Advanced Cargo Movement, Ltd. Charlie drives a lot and so he often buys coffee at coffee vending machines at motorests. Charlie hates change. That is basically th...
分类:其他好文   时间:2015-06-30 16:34:13    阅读次数:148
poj3181 Dollar Dayz
Description Farmer John goes to Dollar Days at The Cow Store and discovers an unlimited number of tools on sale. During his first visit, the tools are selling variously for $1, $2, and $3. Farmer J...
分类:其他好文   时间:2015-06-30 13:05:37    阅读次数:119
hdu2126 Buy the souvenirs
Problem Description When the winter holiday comes, a lot of people will have a trip. Generally, there are a lot of souvenirs to sell, and sometimes the travelers will buy some ones with pleasure. N...
分类:其他好文   时间:2015-06-30 10:53:45    阅读次数:132
poj2923 Relocation
Description Emma and Eric are moving to their new house they bought after returning from their honeymoon. Fortunately, they have a few friends helping them relocate. To move the furniture, they onl...
分类:其他好文   时间:2015-06-23 18:05:04    阅读次数:100
hdu2639 Bone Collector II
Problem Description The title of this problem is familiar,isn't it?yeah,if you had took part in the "Rookie Cup" competition,you must have seem this title.If you haven't seen it before,it doesn't m...
分类:其他好文   时间:2015-06-21 09:29:52    阅读次数:118
poj2184 Cow Exhibition
Description "Fat and docile, big and dumb, they look so stupid, they aren't much fun..." - Cows with Guns by Dana Lyons The cows want to prove to the public that they are both smart and fun....
分类:其他好文   时间:2015-06-20 17:14:26    阅读次数:144
hdu2955 Robberies
Problem Description The aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often because they become too greedy. He has decided t...
分类:其他好文   时间:2015-06-20 17:11:21    阅读次数:163
hdu2546 饭卡
Problem Description 电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。 某天,食堂中有n种菜出售,每种菜可购买一次。已知每种菜的价格以及卡上的余额,问最少可使卡上的余额为多少。   ...
分类:其他好文   时间:2015-06-20 09:17:06    阅读次数:103
01背包 Codeforces Round #267 (Div. 2) C. George and Job
题目传送门 1 /* 2 题意:选择k个m长的区间,使得总和最大 3 01背包:dp[i][j] 表示在i的位置选或不选[i-m+1, i]这个区间,当它是第j个区间。 4 01背包思想,状态转移方程:dp[i][j] = max (dp[i-1][j], dp[i-...
分类:其他好文   时间:2015-06-08 21:17:20    阅读次数:127
BZOJ 1618: [Usaco2008 Nov]Buying Hay 购买干草( dp )
无限背包dp..因为题目中说至少到 H 磅 , 我就直接把 H * 2 了..--------------------------------------------------------------------------#include#include#include#include#defi...
分类:其他好文   时间:2015-06-06 18:09:18    阅读次数:113
292条   上一页 1 ... 21 22 23 24 25 ... 30 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!