码迷,mamicode.com
首页 >  
搜索关键字:poj 2034    ( 20310个结果
POJ 2392 Space Elevator
多重背包问题。 我的背包训练第三题,多重背包。似乎有点理解多重背包了。 我对背包九讲多重背包的理解: 当某件物品 体积*数量 超过背包的容积的时候,这就做完全背包(相当于无限取) void completepack(int h,int cost,int a) { for(int i=cost;i<=a;i++) dp[i]=max(d...
分类:其他好文   时间:2014-07-13 00:09:57    阅读次数:192
poj1664 放苹果(递归)
poj1664 放苹果(递归)...
分类:移动开发   时间:2014-07-12 22:57:59    阅读次数:188
POJ 1273 Drainage Ditches
Drainage Ditches Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 54766   Accepted: 20880 Description Every time it rains on Farmer John's fields, a pond fo...
分类:其他好文   时间:2014-07-12 21:52:47    阅读次数:225
poj 2762 Going from u to v or from v to u? (判断是否是弱联通图)
题意:给定一个有向图有m条单向边,判断是否任意两点都可达(a能到b或者b能到a或者互相可达),即求             弱联通分量。 算法: 先缩点求强连通分量。然后重新建图,判断新图是否是一条单链,即不能分叉,如果分叉了就会存在不可达的情况。 怎么判断是否是单链呢? 就是每次入度为0的点都只有一个,即每次队列里只有一个点。 (    o(╯□╰)o。。。。。好像已...
分类:移动开发   时间:2014-07-12 20:16:44    阅读次数:216
Pku3673
/* B - Cow Multiplication Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 3673 Description Bessie is tired of multiplying pairs of numbers th...
分类:其他好文   时间:2014-07-12 19:19:02    阅读次数:164
poj 1753 Flip Game
Flip Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 29865   Accepted: 12943 Description Flip game is played on a rectangular 4x4 field with two-sided p...
分类:其他好文   时间:2014-07-12 19:15:30    阅读次数:136
poj 3635 Full Tank? ( 图上dp )
题意: 已知每个点的加油站的油价单价(即点权),每条路的长度(边权)。 有q个询问,每个询问包括起点s、终点e和油箱容量。 问从起点走到终点的最小花费。如果不可达输出impossible,否则输出最小的旅途费用。 算法: 其实要分析状态= =感觉就像是dp。 最直接的想法是  每到一个点都加上要走到下一个点所需要的油量。但是走的路不同,到底怎么处理加多少的问题呢? 因...
分类:其他好文   时间:2014-07-12 18:19:04    阅读次数:198
Pku1218
/* A - THE DRUNK JAILER Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 1218 Description A certain prison contains a long hall of n cells, ea...
分类:其他好文   时间:2014-07-12 18:16:27    阅读次数:219
POJ 3009 Curling 2.0
Curling 2.0 Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 10859   Accepted: 4586 Description On Planet MM-21, after their Olympic games this year, curlin...
分类:其他好文   时间:2014-07-12 18:03:08    阅读次数:189
poj 2965 The Pilots Brothers' refrigerator
The Pilots Brothers' refrigerator Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 18109   Accepted: 6871   Special Judge Description The game “The Pilots...
分类:其他好文   时间:2014-07-12 17:21:51    阅读次数:169
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!