码迷,mamicode.com
首页 >  
搜索关键字:highways    ( 182个结果
(最小生成树 Prim) Highways --POJ --1751
链接:http://poj.org/problem?id=1751代码:#include#include#include#include#includeusing namespace std;#define N 800#define INF 0xffffffstruct node {int x, y...
分类:其他好文   时间:2015-08-15 16:08:27    阅读次数:141
HDOJ 1751 Highways(最小生成树prim)
Highways Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 11071   Accepted: 3145   Special Judge Description The island nation of Flatopia is perfectly flat. ...
分类:其他好文   时间:2015-08-14 11:51:21    阅读次数:129
poj 2485 Highways
Highways Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 11071   Accepted: 3145   Special Judge Description The island nation of Flatopia is perfectly flat...
分类:其他好文   时间:2015-08-13 22:19:47    阅读次数:144
Highways(求最小生成树的最大边)
HighwaysTime Limit : 2000/1000ms (Java/Other)Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 4Accepted Submission(s) : 1Problem Descrip...
分类:其他好文   时间:2015-08-13 14:08:42    阅读次数:97
Poj1751--Highways(Prim)
HighwaysTime Limit:1000MSMemory Limit:10000KTotal Submissions:11028Accepted:3124Special JudgeDescriptionThe island nation of Flatopia is perfectly fla...
分类:其他好文   时间:2015-08-13 01:04:38    阅读次数:190
PAT1013. Battle Over Cities (25)
1013. Battle Over Cities (25)It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all th...
分类:其他好文   时间:2015-08-05 21:56:36    阅读次数:116
poj 2485 Highways
答案就是最小生成树中权值最大的边#include#include#include#includeusing namespace std;const int maxn=505;struct Edge{ int from,to,w;} edge[250000+10];int n,ans;int G...
分类:其他好文   时间:2015-08-01 11:26:11    阅读次数:130
Highways---poj1751最小生成树
http://poj.org/problem?id=1751题意:有n个点,已知各点坐标,距离为权值,求最小生成树的边但是这个最小生成树的m条边是已经确定的了,所以可以让已知边的权值为0;在Prim算法中改一下就行#include#include#include#include#include#in...
分类:其他好文   时间:2015-07-28 12:17:36    阅读次数:77
H - Highways - poj 1751(prim)
某个地方政府想修建一些高速公路使他们每个乡镇都可以相同通达,不过以前已经修建过一些公路,现在要实现所有的联通,所花费的最小代价是多少?(也就是最小的修建长度),输出的是需要修的路,不过如果不需要修建就什么都不输出。分析:构建一个完全图,使用krusal进行一些简单优化不知道可以不,试一下吧已经T成狗...
分类:其他好文   时间:2015-07-25 12:06:26    阅读次数:140
题目1437:To Fill or Not to Fill(贪心算法)
题目描述: With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limited, we have to find gas stations on the way from time to time. Dif...
分类:编程语言   时间:2015-07-24 16:13:03    阅读次数:145
182条   上一页 1 ... 10 11 12 13 14 ... 19 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!