![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
搜索专题
文章平均质量分 80
yangjiaronga
这个作者很懒,什么都没留下…
展开
-
搜索基础代码。
说到搜索。都说泪啊。当初原创 2014-08-04 16:19:50 · 693 阅读 · 0 评论 -
搜索专题之素数环之回溯法
Prime Ring ProblemTime Limit:2000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmitStatusDescriptionA ring is compose of n circles as shown in diagram. Put natural numbe原创 2014-08-04 14:11:39 · 760 阅读 · 0 评论 -
搜索算法之诡异的楼梯
诡异的楼梯Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmitStatusPracticeHDU 1180DescriptionHogwarts正式开学以后,Harry发现在Hogwarts里,某些楼梯并不是静止不动的,相反,他们每隔一分钟就变动一次方向.原创 2014-08-05 18:22:36 · 698 阅读 · 0 评论 -
逃离迷宫之转弯问题。
逃离迷宫Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmitStatusDescription 给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方原创 2014-08-04 15:34:49 · 845 阅读 · 0 评论 -
Catch That Cow 一道入门搜索题
Catch That CowTime Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionFarmer John has been informed of the location of a fugitive cow原创 2014-08-04 11:10:04 · 4552 阅读 · 0 评论 -
并查集模板
#include using namespace std;#define N 100005struct set{ int parent; //记录父节点 int rank; //记录集合的节点数} elem[N];int MAX;void init(){ int i; for (i = 0; i <= N; i++) { elem[i].parent原创 2014-11-16 14:03:58 · 349 阅读 · 0 评论 -
N皇后问题之回溯法
N皇后问题Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uDescription在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。你的任务是,对于给定的N,求出有多少种合法的放置方原创 2014-08-04 14:04:20 · 505 阅读 · 0 评论