码迷,mamicode.com
首页 >  
搜索关键字:jungle roads    ( 729个结果
UVALive 4992 Jungle Outpost(半平面交判存)
Jungle OutpostTime limit: 15.000 secondsDescriptionThere is a military base lost deep in the jungle. It is surrounded bynwatchtowers with ultrasonic g...
分类:其他好文   时间:2014-12-08 21:04:51    阅读次数:264
POJ3067(JAPAN)
DescriptionJapan plans to welcome the ACM ICPC World Finals and a lot of roads must be built for the venue. Japan is tall island with N cities on the ...
分类:其他好文   时间:2014-12-05 21:10:41    阅读次数:160
UVA - 539
The Settlers of CatanWithinSettlers of Catan, the 1995 German game of the year, players attempt to dominate an island by building roads, settlements a...
分类:其他好文   时间:2014-11-28 20:08:12    阅读次数:174
[PAT]1087. All Roads Lead to Rome (30)
/************************************************************** 1087. All Roads Lead to Rome (30) 时间限制 200 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Indeed there are many different t...
分类:其他好文   时间:2014-11-27 09:18:36    阅读次数:195
HDU1025_Constructing Roads In JGShining's Kingdom【LIS】【二分法】
题目大意:路两旁各有N个城市,一旁N个富城市,一旁N个穷城市,每个穷 城市缺少一种资源(各不相同),每个富城市拥有一种资源(各不相同),穷城市 p需要从富城市r得到这种资源,就得修路。为了不造成交通堵塞,修的路不能 有交叉,问最多能修几条路,也就是有几个城市得到资源。 思路:就是给你两边各N个点,在这两边连线,每个点只能连一次,问最多有 多少线不交叉。把一边的点按升序排列,那么题目就转换为求另一边的最大上 升子序列了,而这道题数据规模为500000,O(N^2)算法肯定超时,只能用 栈+二分法的O(Nlog...
分类:其他好文   时间:2014-11-26 11:28:08    阅读次数:238
POJ 3411-Paid Roads(DFS)
题目链接:传送门 题意:n个城市,m条道路,要求1--N的最小花费。规定从a城市到城市的花费有两种:如果之前到过c,花费为p,否则花费为r。注意:道路是双向的。 难点:可能a到b有多条路而且花费不同这样的话邻接矩阵会错;有人可能深搜的时候会让每个城市只走一次(DFS惯性思维),但这道题不一样,因为到达下一个城市之前可能需要先到另外一个城市以降低花费。这样的话可以标记每个城市访问过的次数,可以设...
分类:其他好文   时间:2014-11-25 16:37:22    阅读次数:131
hdu 1025 Constructing Roads In JGShining's Kingdom(二分法+最长上升子序列)
题目dayi...
分类:其他好文   时间:2014-11-23 18:59:00    阅读次数:183
九度 题目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 years ago. But the jungle overtake...
分类:其他好文   时间:2014-11-20 09:08:21    阅读次数:364
hdu Constructing Roads(最小生成树,kuskal算法)
Constructing Roads Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 14569    Accepted Submission(s): 5530 Problem Description There ...
分类:编程语言   时间:2014-11-11 22:56:48    阅读次数:399
UVALive 6622 Absurdistan Roads
题意: n(2000)个点的图  给出它的最短路矩阵  用n条边构造出满足最短路矩阵的图  保证图连通且解存在 思路: 我们可以先保证图连通  那么需要n-1条边  联想到是不是最小生成树?? 可以这样想  假设abc点已经连通  现在考虑再加入到连通块中一个点比如d  如果d-b的距离是d到abc三个点中最短的  那么这条边一定要被选  因为如果不选d-b  假设选了d-a  那么d...
分类:其他好文   时间:2014-11-06 21:58:15    阅读次数:234
729条   上一页 1 ... 58 59 60 61 62 ... 73 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!