摘要:
最优比率生成树。CODE:#include<cstdio>#include<cstring>#include<cstdlib>#include<iostream>#include<cmath>usingnamespacestd;#defineeps1e-4constintINF=0x3f3f3f3f;constintMAXN=1010;doublew[MAXN][MAXN],d[MAXN];doubledis[MAXN][MAXN],cost[MAXN][MAXN];intn,m;structnode{doublex,y,z;}a[M 阅读全文
posted @ 2012-10-24 19:03
有间博客
阅读(147)
评论(0)
推荐(0)
摘要:
SPFA+0/1分数规划。CODE:#include<iostream>#include<cstdlib>#include<cstdio>#include<cstring>#include<queue>usingnamespacestd;#defineMAXN1010#defineINF0X3F3F3F3F#defineeps1e-7structEdge{intv,next;doublew;}edge[MAXN*5];doubled[MAXN],num[MAXN];intfirst[MAXN];intn,m,cnt;voidinit( 阅读全文
posted @ 2012-10-24 19:01
有间博客
阅读(183)
评论(0)
推荐(0)