最小生成树
文章平均质量分 78
dashuxiaoai52613
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
poj 最小生成树1258
Agri-NetTime Limit: 1000ms Memory limit: 10000kB 题目描述 Farmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs原创 2010-05-16 11:30:00 · 727 阅读 · 0 评论 -
PKU3026最小生成树+BFS+prim
//题意:只有在点S或点A可以分,求从点S到达所有点A的最少步数。可以用BFS+Prim实现,BFS用来求得任意两点间////可达所需的最少步数,从而能构成一张图,两点间的权值就是BFS求得的最少步数。然后用Prim求解。 #include#include#include#define MAXX 0x7fffffffusing namespace std;原创 2010-05-18 21:07:00 · 272 阅读 · 0 评论 -
poj 1258krushal
Agri-NetTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 14112 Accepted: 5700DescriptionFarmer John has been elected mayor of his town! One of his campaign原创 2010-05-20 21:18:00 · 339 阅读 · 0 评论 -
hdu1102绝对模板
<br />相信自己的模板<br />#define MAX_VERTEX_NUM 101 #define INFINITY 0x11111111 typedef struct{ int val; //int info; }ArcType,ArcMatrix[MAX_VERTEX_NUM][MAX_VERTEX_NUM]; typedef struct{ int vexnum; VertexType vexs[MAX_VERTEX_NUM]; A原创 2010-07-25 17:27:00 · 335 阅读 · 0 评论 -
hdu1233 向联通图 要双向都联通
<br />// Prim.cpp : Defines the entry point for the console application. // #define MAX_VERTEX_NUM 101 #define INFINITY 0x11111111 #define TRUE 1 #define FALSE 0 typedef struct{ //int info; }VertexType; typedef struct{ int val;原创 2010-07-26 09:23:00 · 250 阅读 · 0 评论 -
hdu3371一个“ ; ”一个郁闷
<br />#define MAX_VERTEX_NUM 505 #define INFINITY 0x11111111 typedef struct{ //int info; }VertexType; typedef struct{ int val; //int info; }ArcType,ArcMatrix[MAX_VERTEX_NUM][MAX_VERTEX_NUM]; typedef struct{ int vexnum; Vertex原创 2010-07-27 10:09:00 · 449 阅读 · 0 评论 -
hdu1875 畅通工程再续
完整自己写原创 2010-07-28 16:43:00 · 1187 阅读 · 0 评论 -
hdu3405独立日——World Islands
0xfffffff最大double原创 2010-07-29 13:07:00 · 440 阅读 · 0 评论
分享