![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM 搜索
FoRever
看淡了...A多少题并不是水平的体现...我自己学的爽就行...
展开
-
搜索理论 [转载自cnblog]
搜索理论 宽度优先搜索bfs 一、搜索的bfs,宽度优先搜索,一般用于求最短的得到到目的地的距离,有个起始点,先把这个起始点入队列,不要忘记将这个起始点标记为已经利用,不然会走回来的,然后是与这个起始点的周围的点的监测,若可以行的通,我们一一检测这些扩展出来的点,若是目的地就结束了,若不是目的地,将改点标记为已经利用,并将该点入队列。 二、搜索的双向bfs,双向的bfs一般来说可转载 2012-02-29 10:35:04 · 197 阅读 · 0 评论 -
HDU 4255 A Famous Grid 素数+BFS
打素数表,构造矩阵,然后BFS可得答案 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #incl原创 2012-12-22 20:27:43 · 307 阅读 · 0 评论 -
POJ 2029 Get Many Persimmon Trees 简单搜索----解题报告
题目很简单...给你N个星星的坐标...找出在m*n的方框中最多能容纳几个星星...直接遍历一遍整个图...属于简单搜索~ #include #include #include #include #include #include #include #include #include #include #include #include #include #in原创 2012-08-09 10:34:01 · 230 阅读 · 0 评论 -
HDU 3368 Reversi 解题报告
Reversi Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 805 Accepted Submission(s): 332 Problem Description Reversi, also called原创 2012-05-14 22:31:38 · 596 阅读 · 0 评论 -
POJ 2192 Zipper 解题报告
Language: Default Zipper Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 12609 Accepted: 4399 Description Given three strings, you are to determine w原创 2012-05-12 13:49:13 · 624 阅读 · 0 评论 -
POJ 3278 Catch That Cow 解题报告 [转载]
/* 我自己的代码一直WA,但是不知道为什么,所以只好贴别人的了,下一节,HASH+二分搜索~!!! Catch That Cow Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 27986 Accepted: 8622 Description Farmer John has been informed of the转载 2012-03-11 10:28:31 · 1009 阅读 · 0 评论 -
POJ 2488 骑士漫游 解题报告[原创]
/* A Knight's Journey Time Limit: 1000MS Memory Limit: 65536K Description Background The knight is getting bored of seeing the same black and white原创 2012-03-10 20:09:18 · 717 阅读 · 0 评论 -
POJ 1321 棋盘问题 解题报告[原创]
/* 棋盘问题 Time Limit: 1000MS Memory Limit: 10000K Description 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。 Input 输入含有多组测试数据。 每组数据的原创 2012-03-10 13:41:55 · 1148 阅读 · 1 评论 -
POJ3083解题报告 [转自岁月流风]
POJ-3083 Children of the Candy Corn 解题报告 转自http://blog.csdn.net/angle555945/article/details/7303207 Description The cornfield maze is a popular Halloween treat. Visitors are shown the ent转载 2012-03-07 16:56:54 · 199 阅读 · 0 评论 -
POJ 3083 Children of the Candy Corn BFS
/* Children of the Candy Corn Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 5995 Accepted: 2622 Description The cornfield maze is a popular Halloween treat. Visitors are shown the ent原创 2012-03-08 14:50:36 · 401 阅读 · 0 评论