码迷,mamicode.com
首页 >  
搜索关键字:jungle roads    ( 729个结果
POJ 2631 Roads in the North (求树的直径)
Description Building and maintaining roads among communities in the far North is an expensive business. With this in mind, the roads are build such th ...
分类:其他好文   时间:2016-08-02 19:17:50    阅读次数:192
POJ1861 Jungle Roads(Kruskal)(并查集)
Jungle Roads Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 23882 Accepted: 11193 Description The Head Elder of the tropical island of Lag ...
分类:其他好文   时间:2016-08-02 13:37:14    阅读次数:133
H - Funny Car Racing
There is a funny car racing in a city with n junctions and m directed roads. The funny part is: each road is open and closed periodically. Each road i ...
分类:其他好文   时间:2016-07-31 22:00:53    阅读次数:214
HDU-1301 Jungle Roads(最小生成树[Prim])
Jungle Roads Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description #include <iostream> #include<cstdio> #include<cstring> #incl ...
分类:其他好文   时间:2016-07-31 17:36:32    阅读次数:162
2016HUAS_ACM暑假集训3F - Jungle Roads
这个题目属于最小生成树问题,可以用Prim,也可以用Kruskal(还没试)。题意简单直接,给你一个图,求出它最小生成树的权值。 题目最有趣的地方就是图的顶点是字母,稍微处理一下就好了。 Sample Input 9 //顶点个数,0时结束 A 2 B 12 I 25 //每个顶点与后面N个顶点连通 ...
分类:其他好文   时间:2016-07-31 17:23:08    阅读次数:156
POJ 1251-Jungle Roads
原题链接:点击此处 题目大意在相通n个岛屿的所有桥都坏了,要重修,重修每一个桥所用的时间不同,求重修使每个岛屿都间接或直接与其他岛屿相同时所用的的最短时间(只有修完一个桥后才可修下一个桥)。简言之就是求最小生成树。 对于数据,数据输入的第一行n代表岛屿的个数,当为0是结束程序,接着n-1行开始时为这 ...
分类:其他好文   时间:2016-07-30 22:19:12    阅读次数:117
bzoj1689[Usaco2005 Open] Muddy roads 泥泞的路
bzoj1689[Usaco2005 Open] Muddy roads 泥泞的路 题意: 数轴上n个互不覆盖的区间,问要用多少个长为L的线段覆盖。n≤10000 题解: 排序区间,然后从每个区间左端点开始铺木板,如果最后一块木板能够铺到下一个区间就铺,以此类推。 代码: 20160729 ...
分类:其他好文   时间:2016-07-29 22:59:24    阅读次数:169
ACM: 强化训练-Roads in the North-BFS-树的直径裸题
Roads in the North Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu Roads in the North Description Building and maintaining roads am ...
分类:其他好文   时间:2016-07-29 21:19:54    阅读次数:204
Jungle Roads
Description 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 s ...
分类:其他好文   时间:2016-07-28 13:57:43    阅读次数:182
POJ - 1251 Jungle Roads
题目链接:http://poj.org/problem?id=1251 分析:最小生成树模板题,注意将字母转化为数字ch-'A'+1,输入时%s%d,或者使用cin避免空格回车造成的影响 ...
分类:其他好文   时间:2016-07-22 22:55:47    阅读次数:210
729条   上一页 1 ... 33 34 35 36 37 ... 73 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!