码迷,mamicode.com
首页 >  
搜索关键字:poj3169    ( 23个结果
POJ3169:Layout(差分约束)
http://poj.org/problem?id=3169题意:一堆牛在一条直线上按编号站队,在同一位置可以有多头牛并列站在一起,但编号小的牛所占的位置不能超过编号大的牛所占的位置,这里用d[i]表示编 号为i的牛所处的位置,即要满足d[i]-d[i+1]如果是喜欢关系:即需要满足d[b]-d[a...
分类:其他好文   时间:2014-08-28 09:38:09    阅读次数:154
POJ3169_Layout(差分约束)
解题报告 题目传送门 思路: 简单的差分约束 求解max n-1 以1为起点,n为终点跑一下最短路就可以了,求出的dis[n]就是答案 #include #include #include #include #define N 5000 #define M 50000 #define inf 0x3f3f3f3f using namespace std; struct nod...
分类:其他好文   时间:2014-08-23 19:05:21    阅读次数:255
POJ3169-Layout
Layout Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6582   Accepted: 3182 Description Like everyone else, cows like to stand close to their friends when que...
分类:其他好文   时间:2014-06-21 23:54:18    阅读次数:307
23条   上一页 1 2 3
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!