LouZhang

导航

2012年9月4日

poj_2728,最优比率生成树

摘要: http://poj.org/problem?id=2728上次也做过类似的,就是花费和路径的比值最小,不过和这不一样。。。。证明就网上搜吧。。一大堆。。我这是看别人的代码写的,迭代。。。错在精度上搞好久了。。。#include<cstdio>#include<cstring>#include<cmath>const int maxn(1010);#define inf 999999999int n;double g[maxn][maxn], cost[maxn][maxn];int vis[maxn];double dist[maxn];double x[ 阅读全文

posted @ 2012-09-04 22:20 louzhang_swk 阅读(221) 评论(0) 推荐(0) 编辑