码迷,mamicode.com
首页 >  
搜索关键字:cow relays    ( 1712个结果
PKU 2184 Cow Exhibition 01背包
题意: 有一些牛,每头牛有一个Si值,一个Fi值,选出一些牛,使得max( sum(Si+Fi) ) 并且 sum(Si)>=0, sum(Fi)>=0思路: 随便选一维做容量(比如Fi),另一维做价值,然后直接做01背包。 做的时候注意一下方向。 最后,在合法解里面找一下最优解就好了。代码...
分类:其他好文   时间:2014-11-25 01:41:50    阅读次数:256
POJ3176_Cow Bowling【数塔DP】
题目大意:给你一个三角形的数塔,问从上走到最下边,得到最大的和是多少 思路:从下往上推,当前值大的和上边的值相加...
分类:其他好文   时间:2014-11-24 17:21:46    阅读次数:172
poj3278--Catch That Cow(bfs)
Catch That CowTime Limit:2000MSMemory Limit:65536KDescriptionFarmer John has been informed of the location of a fugitive(逃亡的;难以捉摸的;短...
分类:其他好文   时间:2014-11-24 17:10:33    阅读次数:216
BZOJ 1648: [Usaco2006 Dec]Cow Picnic 奶牛野餐
题目1648: [Usaco2006 Dec]Cow Picnic 奶牛野餐Time Limit:5 SecMemory Limit:64 MBSubmit:425Solved:267[Submit][Status]DescriptionThe cows are having a picnic! E...
分类:其他好文   时间:2014-11-22 11:46:54    阅读次数:337
poj3268 Silver Cow Party (SPFA求最短路)
其实还是从一个x点出发到所有点的最短路问题。来和回只需分别处理一下逆图和原图,两次SPFA就行了。#include#include#include#include#include#include#include#include#include#include#include#include#incl...
分类:其他好文   时间:2014-11-18 23:58:43    阅读次数:450
POJ 3278 Catch That Cow
#include#include#include#include#include#define maxn 100005using namespace std;queue q;int step[maxn];int visit[maxn];int n,k;int head,next;int bfs(){...
分类:其他好文   时间:2014-11-17 15:33:46    阅读次数:144
POJ 3176-Cow Bowling(DP||记忆化搜索)
Cow Bowling Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 14210   Accepted: 9432 Description The cows don't use actual bowling balls when they go bowling. ...
分类:其他好文   时间:2014-11-16 18:44:34    阅读次数:201
POJ 3176(Cow Bowling )(就是简单的数塔,动态规划)
Cow Bowling Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 14206   Accepted: 9428 Description The cows don't use actual bowling balls when they go bowling. ...
分类:其他好文   时间:2014-11-16 17:24:45    阅读次数:134
POJ 3267-The Cow Lexicon(DP)
The Cow Lexicon Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 8252   Accepted: 3888 Description Few know that the cows have their own dictionary with W (1 ...
分类:其他好文   时间:2014-11-16 16:00:13    阅读次数:134
BZOJ3476 [Usaco2014 Mar]The Lazy Cow
这题做的我真是23333。。。奥,这题表述不清,是说曼哈顿距离 11 #include 12 #include 13 14 #define lson p > 1;64 if (L k) {82 L = a[j].y - k + 1, R = a[j].y, del...
分类:其他好文   时间:2014-11-16 15:57:23    阅读次数:322
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!