Dreams of finding lost treasure almost came true recently. A new machine called 'The Revealer' has been invented and it has been used to detect gold w
分类:
其他好文 时间:
2016-03-19 22:46:41
阅读次数:
288
分析:dancing links 裸题 ,只要把每个格子看成一列就好了,精确不重复覆盖问题
分类:
其他好文 时间:
2016-03-17 12:21:37
阅读次数:
201
题目链接: http://poj.org/problem?id=1066 -------------------------------------------------------------------------------------------------------- 这题刚看后可能会
分类:
其他好文 时间:
2016-03-10 23:33:42
阅读次数:
161
题目链接:[kuangbin带你飞]专题三 Dancing Links B - Treasure Map题意
给一矩形和k个小矩形,问选取最小数量为多少的小矩形可以对大矩形进行精确覆盖。
思路
仍然是个模版题,把二维的n*m的大矩形看作是一维的n*m的一条线。k个小矩形同理,那么就转化成01矩阵精确覆盖的问题了。
代码#include
#include <algorit...
分类:
其他好文 时间:
2016-02-21 20:01:43
阅读次数:
204
目 录 《泰坦尼克号》全部英文剧本 TV REPORTER: Treasure hunter Brock Lovett is best known for finding Spanish gold off islands in the best Caribbean. LIZZY: It’s OK,
分类:
其他好文 时间:
2016-02-13 18:17:56
阅读次数:
7683
POJ 2594 Treasure Exploration 题目链接 题意:有向无环图,求最少多少条路径能够覆盖整个图,点能够反复走 思路:和普通的最小路径覆盖不同的是,点能够反复走,那么事实上仅仅要在多一步。利用floyd求出传递闭包。然后依据这个新的图去做最小路径覆盖就可以 代码: #inclu
分类:
其他好文 时间:
2016-02-08 13:28:45
阅读次数:
168
这就是个简单的bfs。真没什么好说的,三维的状态就可以了。每次预处理一下monster的位置,然后再恢复。 1 /* 1924 */ 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #...
分类:
其他好文 时间:
2016-01-12 01:16:28
阅读次数:
297
用最少的矩阵覆盖n*m的地图。注意矩阵不能互相覆盖。这里显然是一个精确覆盖,但因为矩阵拼接过程中,有公共的边,这里须要的技巧就是把矩阵的左边和以下截去一个单位。#include #include #include #include #include #include #include #includ...
分类:
其他好文 时间:
2015-12-22 09:02:02
阅读次数:
218
题目链接精确覆盖的模板题, 把每一个格子当成一列就可以。S忘记初始化TLE N次, 哭晕在厕所...... 1 #include 2 using namespace std; 3 #define pb(x) push_back(x) 4 #define ll long long 5 #de...
分类:
其他好文 时间:
2015-12-10 21:42:20
阅读次数:
191
Problem DescriptionLong long ago, there is a gunner whose name is Jack. He likes to go hunting very much. One day he go to the grove. There are n bird...
分类:
其他好文 时间:
2015-11-24 22:02:27
阅读次数:
210