码迷,mamicode.com
首页 >  
搜索关键字:dining cows    ( 1679个结果
POJ 3187 Backward Digit Sums(next_permutation)
Description FJ and his cows enjoy playing a mental game. They write down the numbers from 1 to N (1 <= N <= 10) in a certain order and then sum adjacent numbers to produce a new list with one fewer...
分类:其他好文   时间:2014-08-20 10:33:36    阅读次数:256
POJ 3281 Dining(最大流建图 && ISAP && 拆点)
题目链接:http://poj.org/problem?id=3281 努力练建图ing!!! 题意:有 N 头牛,有 F 种食物和 D 种饮料,每种食物或饮料只能供一头牛享用,且每头牛只享用一种食物和一种饮料。 第2行-第N+1行。是牛i 喜欢A种食物,B种饮料,及食物种类列表和饮料种类列表。 问最多能使几头牛同时享用到自己喜欢的食物和饮料。->最大流。 本题难...
分类:其他好文   时间:2014-08-19 20:54:25    阅读次数:266
POJ3258:River Hopscotch(二分)
Description Every year the cows hold an event featuring a peculiar version of hopscotch that involves carefully jumping from rock to rock in a river. The excitement takes place on a long, straight ...
分类:其他好文   时间:2014-08-18 16:31:12    阅读次数:201
poj3621 Sightseeing Cows --- 01分数规划
典型的求最优比例环问题參考资料:http://blog.csdn.net/hhaile/article/details/8883652此题中,给出每一个点和每条边的权值,求一个环使 ans=∑点权/∑边权 最大。由于题目要求一个环,并且必定是首尾相接的一个我们理解的纯粹的环,不可能是其它样子的环,所...
分类:其他好文   时间:2014-08-18 12:09:34    阅读次数:200
POJ 3670 && POJ 3671 (dp)
最长不下降子序列的应用嘛。两题都是一样的。 POJ 3670:求给定序列按递增或递减排列时,所需改变的最小的数字的数目。 POJ 3671:求给定序列按递增排列时,所需改变的最小的数字的数目。   思路就是求最长不下降子序列,然后剩下的就是需要改变的字母。 最长不下降子序列:(我之前有写过,不懂请戳)http://blog.csdn.net/darwin_/article/detail...
分类:其他好文   时间:2014-08-18 00:21:03    阅读次数:231
poj 2431 Expedition (贪心+优先队列)
Expedition Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6890   Accepted: 2065 Description A group of cows grabbed a truck and ventured on an expedition de...
分类:其他好文   时间:2014-08-17 19:59:02    阅读次数:1506
POJ 2387-Til the Cows Come Home(最短路Dijkstra+优先队列)
Til the Cows Come Home Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 30007   Accepted: 10092 Description Bessie is out in the field and wants to get back t...
分类:其他好文   时间:2014-08-17 15:35:32    阅读次数:226
poj 3186 Treats for the Cows dp
#include #include using namespace std;#define maxn 2100int dp[maxn][maxn];int val[maxn];int n;int main(){ while(scanf("%d",&n)!=EOF) { in...
分类:其他好文   时间:2014-08-17 10:24:22    阅读次数:153
POJ 3670 Eating Together
Description The cows are so very silly about their dinner partners. They have organized themselves into three groups (conveniently numbered 1, 2, and 3) that insist upon dining together. The troubl...
分类:其他好文   时间:2014-08-15 17:56:49    阅读次数:205
poj 2387 Til the Cows Come Home(dijkstra算法)
题目链接:http://poj.org/problem?id=2387题目大意:起点一定是1,终点给出,然后求出1到所给点的最短路径。注意的是先输入边,在输入的顶点数,不要弄反哦~~~ 1 #include 2 #include 3 using namespace std; 4 int map[.....
分类:其他好文   时间:2014-08-14 23:16:26    阅读次数:341
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!