码迷,mamicode.com
首页 >  
搜索关键字:d. arthur and walls    ( 185个结果
POJ3682King Arthur's Birthday Celebration(数学期望||概率DP)
King Arthur is an narcissist who intends to spare no coins to celebrate his coming K-th birthday. The luxurious celebration will start on his birthday ...
分类:其他好文   时间:2017-12-17 15:03:02    阅读次数:189
Codeforces 101628A - Arthur's Language
101628A - Arthur's Language 思路:dp,状态转移见代码。 代码: ...
分类:其他好文   时间:2017-12-03 15:33:35    阅读次数:122
286. Walls and Gates
You are given a m x n 2D grid initialized with these three possible values. Fill each empty room with the distance to its nearest gate. If it is impos ...
分类:其他好文   时间:2017-11-23 19:42:14    阅读次数:155
Jumping on Walls CodeForces - 198B
Jumping on Walls CodeForces - 198B 应该是一个隐式图的bfs,或者叫dp。 先是一个TLE的O(nklogn) 后来意识到了同样的位置,在较早的时间到过之后在较晚的时间再到那里一定不会比较早的时间更好,因此相同状态只需遍历一次,可以把复杂度优化到O(nlogn)(话 ...
分类:其他好文   时间:2017-10-12 10:09:33    阅读次数:118
61条面向对象设计的经验原则
61条面向对象设计的经验原则 你不必严格遵守这些原则,违背它们也不会被处以宗教刑罚。但你应当把这些原则看成警铃,若违背了其中的一条,那么警铃就会响起。 Arthur J.Riel (1)所有数据都应该隐藏在所在的类的内部。p13 (2)类的使用者必须依赖类的共有接口,但类不能依赖它的使用者。p15 ...
分类:其他好文   时间:2017-09-30 00:29:40    阅读次数:174
HDU 6187 Destroy Walls
最大生成树。 仔细想想会发现和坐标并没有任何关系,$king$要到达任何地点,也就是说给出的图中不能有环,因此对原图求最大生成树,不在最大生成树上的边就是要删除的,而且数量最小,费用最小。 ...
分类:其他好文   时间:2017-09-09 09:46:49    阅读次数:134
HDU 6187 Destroy Walls (对偶图最小生成树)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6187 题意:有一个V个结点M条边的带边权无向平面图,有一个人在一个区域,要拆一些墙使得他可以到达任意一个区域,问最小花费。 解法: ...
分类:其他好文   时间:2017-09-08 21:39:05    阅读次数:181
LeetCode 286: Walls and Gates
Note: Need to skipp the 0 element update room but cannot skip BFS from that point ...
分类:其他好文   时间:2017-09-07 14:58:10    阅读次数:104
LeetCode 554: Brick Wall
The largest number could be n of walls. ...
分类:其他好文   时间:2017-09-03 10:09:23    阅读次数:173
G - Rescue 【BFS+优先队列】
Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M <= 200) matrix. There are WALLs, ROADs, and ...
分类:其他好文   时间:2017-08-22 00:20:03    阅读次数:184
185条   上一页 1 ... 4 5 6 7 8 ... 19 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!