码迷,mamicode.com
首页 >  
搜索关键字:jungle roads    ( 729个结果
poj1947--Rebuilding Roads(树状dp)
Rebuilding Roads Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 9496   Accepted: 4316 Description The cows have reconstructed Farmer John's farm, with its N b...
分类:其他好文   时间:2015-03-06 20:46:41    阅读次数:222
POJ 3411-Paid Roads(状态压缩+dijkstra算法+floyd-warshall算法)
题目大意:给出一张有向图,求点1到点N的最短路,不同的是,对于每一条边,除了源点目标点和花费以外,还有额外点c,若走这条边之前到达过c点,花费会减少到另一个值P。如果最短路不存在,输出impossible。 先用floyd-warshall算法判断连通性,此时忽略额外的c和P。 然后用dijkstra算法,用d[i][S]表示在点i且经过了S集合的点的最短路,将每一个d[i][S]都看...
分类:编程语言   时间:2015-03-02 09:33:06    阅读次数:178
hdu 2586 LCA模板题(离线算法)
http://acm.hdu.edu.cn/showproblem.php?pid=2586 Problem Description There are n houses in the village and some bidirectional roads connecting them. Every day peole always like to ask like this ...
分类:编程语言   时间:2015-03-01 11:59:18    阅读次数:710
PAT1087. All Roads Lead to Rome
Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route with the least cost while gainin...
分类:其他好文   时间:2015-03-01 10:28:52    阅读次数:192
1003. Emergency
As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of rescue teams in each city and the l...
分类:其他好文   时间:2015-02-27 13:42:44    阅读次数:167
hdu 3371 Connect the Cities Prim + Kruskal两种算法分别AC 水过~~~~
Problem Description In 2100, since the sea level rise, most of the cities disappear. Though some survived cities are still connected with others, but most of them become disconnected. The government wants to build some roads to connect all of these cities ...
分类:编程语言   时间:2015-02-23 17:57:24    阅读次数:271
hdu 1301 Jungle Roads 一个很水的题 AC率也可以知道了 但是题目很难理解啊 英语渣o(╯□╰)oKruskal算法
The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relentlessly, so the large road network is too expensive to maintain. Th...
分类:编程语言   时间:2015-02-23 15:31:52    阅读次数:212
hdu 1102 Constructing Roads 最小生成树Prim算法AC 水~~~
Problem Description There are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say two village A and B are connected, if and only if there is a road between A and B, or t...
分类:编程语言   时间:2015-02-23 15:31:07    阅读次数:231
1003. Emergency (25)
As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of rescue teams in each city and the l...
分类:其他好文   时间:2015-02-23 14:19:34    阅读次数:165
NYOJ 434 && POJ 1251 Jungle Roads(最小生成树)
链接:click here 题意: 题目大意在相通n个岛屿的所有桥都坏了,要重修,重修每一个桥所用的时间不同,求重修使每个岛屿都间接或直接与其他岛屿相同时所用的的最短时间(只有修完一个桥后才可修下一个桥)。简言之就是求最小生成树。 对于数据,数据输入的第一行n代表岛屿的个数,当为0是结束程序,接着n-1行开始时为这岛屿的编号,用大写字母表示,接着是一个整数m,表示与该岛屿连接的字...
分类:其他好文   时间:2015-02-21 21:07:58    阅读次数:192
729条   上一页 1 ... 54 55 56 57 58 ... 73 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!