摘要:
首先很显然,生成树上的边权应减小,非生成树上的边权应增大。令 xi=ci−di , yj=dj−cj (xi>=0,yj>=0) 若树边 i 在非树边 j 和生成树形成的环上, 有 di=ci−cj建立二分图,其中 wi,j=ci−cj,KM 算法求最大权匹配,满足 Ai+Bj>=... 阅读全文
posted @ 2015-06-10 17:00
<Dash>
阅读(146)
评论(0)
推荐(0)
摘要:
Dp,justmakesense.时间复杂度: O(n∗s2)#include#include#include#include#includeconst int MAXN = 1e3+5, SZ = (1<<7)+1, INF = 0x3f3f3f3f;int n, x[MAXN],... 阅读全文
posted @ 2015-06-10 08:39
<Dash>
阅读(109)
评论(0)
推荐(0)