码迷,mamicode.com
首页 >  
搜索关键字:jungle roads    ( 729个结果
hdu1102 Constructing Roads 基础最小生成树
1 //克鲁斯卡尔(最小生成树) 2 #include 3 #include 4 #include 5 using namespace std; 6 7 const int maxn = 100005; 8 int n, t; 9 struct node 10 { 11 int bagin, end... ...
分类:其他好文   时间:2017-07-21 22:05:47    阅读次数:140
HDU5723 Abandoned country 最小生成树+深搜回溯法
Description An abandoned country has n(n≤100000) villages which are numbered from 1 to n. Since abandoned for a long time, the roads need to be re-bui ...
分类:其他好文   时间:2017-07-20 23:56:57    阅读次数:221
LCA距离
Problem Description There are n houses in the village and some bidirectional roads connecting them. Every day peole always like to ask like this "How ...
分类:其他好文   时间:2017-07-20 20:56:06    阅读次数:160
hdu1025 Constructing Roads In JGShining's Kingdom (nlogn的LIS)
题目链接 第一次写nlogn复杂度的LIS,纪念一下。 题目意思是说。有两条平行线,两条平行线都有n个城市,都是从左到右标记为1--n,一条线上是富有城市,一个是贫穷城市。输入n,接下来有n行,p,r表示穷城市p和富有城市r 之间能够建一条路(p的顺序是1--n,一个贫穷城市仅仅相应一个富有城市(弱 ...
分类:其他好文   时间:2017-07-15 16:56:09    阅读次数:160
【DFS】【枚举】Gym - 101246G - Revolutionary Roads
给你一张有向图,问你将任意一条边变成双向后,所能得到的最大强连通分量的大小。 缩点之后,预处理can(i,j)表示i能到j。 之后枚举每一条边(u,v),再枚举其他所有点t,如果can(u,t) && can(t,v),则t能和u、v共在一个强连通分量,尝试更新答案。 ...
分类:其他好文   时间:2017-07-14 19:39:21    阅读次数:241
cf246 ENew Reform (并查集找环)
Berland has n cities connected by m bidirectional roads. No road connects a city to itself, and each pair of cities is connected by no more than one r ...
分类:其他好文   时间:2017-07-13 12:03:31    阅读次数:174
151. [USACO Dec07] 建造路径
★★ 输入文件:roads.in 输出文件:roads.out 简单对比 时间限制:1 s 内存限制:128 MB 译 by CmYkRgB123描述Farmer John 刚刚得到了几个新农场!他想把这几个农场用路连接起来,这样他就可以通过笔直的公路从一个农场到另一个农场了。现在已经有了几条连接着 ...
分类:其他好文   时间:2017-07-12 23:17:00    阅读次数:133
hdu1025 Constructing Roads In JGShining's Kingdom(二分+dp)
转载请注明出处:http://blog.csdn.net/u012860063 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1025 Problem Description JGShining's kingdom consists of 2n(n i ...
分类:其他好文   时间:2017-07-08 16:17:24    阅读次数:181
九度 题目1154:Jungle Roads
题目描写叙述: 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 ...
分类:其他好文   时间:2017-07-01 17:20:44    阅读次数:253
建造道路 (Building Roads, USACO 2007 Dec)
题目描述 Farmer John had just acquired several new farms! He wants to connect the farms with roads so that he can travel from any farm to any other farm v ...
分类:其他好文   时间:2017-06-26 21:07:06    阅读次数:130
729条   上一页 1 ... 22 23 24 25 26 ... 73 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!