Floyd求最小环 hdu1599 find the mincost route
裸的最小环。
用Floyd实现非常简单。
代码如下:
#include
#include
const int N = 128;
const int INF = 0x3f3f3f3f;
int n, m;
int g[N][N];
int dis[N][N];
int floyd () {
memset(dis, INF, sizeof(dis));
int minCir
原创
2015-11-04 21:24:02 ·
326 阅读 ·
0 评论