码迷,mamicode.com
首页 >  
搜索关键字:jungle roads    ( 729个结果
LIS问题---HDU1025 Constructing Roads In JGShining's Kingdom
发现这个说的比较通俗:假设存在一个序列d[1..9] = 2 1 5 3 6 4 8 9 7,可以看出来它的LIS长度为5。下面一步一步试着找出它。我们定义一个序列B,然后令 i = 1 to 9 逐个考察这个序列。此外,我们用一个变量Len来记录现在最长算到多少了首先,把d[1]有序地放到B里,令...
分类:其他好文   时间:2014-08-15 20:50:19    阅读次数:364
HDU 1025 Constructing Roads In JGShining's Kingdom LIS题解
本题是LIS题解。主要是理解他的题意。他的题意都好像比较隐晦,比如每个poor city和rich city一定是需要对应起来的,比如poor city和rich city并不是按顺序给出的。 其实是可以把数列按照poor city排序,然后求rich city城市号的最大递增子序列。 不过这里不用排序,利用hash的思想直接对应起来就可以了。 然后就是本题是卡DP的O(n*n)的解法的,这...
分类:其他好文   时间:2014-08-15 17:55:49    阅读次数:211
HDU 1025 Constructing Roads In JGShining's Kingdom (DP)
Problem Description JGShining's kingdom consists of 2n(n is no more than 500,000) small cities which are located in two parallel lines. Half of these cities are rich in resource (we call them ri...
分类:其他好文   时间:2014-08-14 01:37:07    阅读次数:237
UVa - 12661 - Funny Car Racing
先上题目:12661 Funny Car RacingThere 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...
分类:其他好文   时间:2014-08-13 21:55:38    阅读次数:340
POJ 2421 Constructing Roads(Kruskal算法)
题意:给出n个村庄之间的距离,再给出已经连通起来了的村庄。求把所有的村庄都连通要修路的长度的最小值。思路:Kruskal算法课本代码://Kruskal算法#includeusing namespace std;int fa[120];int get_father(int x){ return fa...
分类:其他好文   时间:2014-08-13 14:21:16    阅读次数:212
poj----(1251)Jungle Roads(最小生成树)
Jungle RoadsTime Limit:1000MSMemory Limit:10000KTotal Submissions:19265Accepted:8806DescriptionThe Head Elder of the tropical island of Lagrishan has ...
分类:其他好文   时间:2014-08-12 21:48:04    阅读次数:182
HDU2988 Dark roads 【最小生成树Kruskal】
Dark roads Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 583    Accepted Submission(s): 253 Problem Description Economic times th...
分类:其他好文   时间:2014-08-11 21:26:42    阅读次数:208
hdu oj1102 Constructing Roads(最小生成树)
Constructing Roads Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 13995    Accepted Submission(s): 5324 Problem Description There ...
分类:其他好文   时间:2014-08-10 21:40:41    阅读次数:276
hdu 1301 Jungle Roads(最小生成树)
Problem DescriptionThe Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between vil...
分类:其他好文   时间:2014-08-06 18:02:11    阅读次数:275
杭电 1025 Constructing Roads In JGShining's Kingdom(二分查找)
http://acm.hdu.edu.cn/showproblem.php?pid=1025 Constructing Roads In JGShining's Kingdom Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1...
分类:其他好文   时间:2014-08-05 19:26:50    阅读次数:270
729条   上一页 1 ... 65 66 67 68 69 ... 73 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!