![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
搜索
Mosu_
心有猛虎,细嗅蔷薇,过去,现在抑或未来。。。
展开
-
NYOJ927 The partial sum problem
搜索的入门,学会思想吧!原创 2014-11-16 09:37:53 · 416 阅读 · 0 评论 -
Find The Multiple
题意:寻找一个数,能除开所给的n,且这个数是由1或0组成的。则从1开始判断,每次是*10+1或*10则判断。 考虑到用DFS,但是n #include #include #include #include #include #include using namespace std; long long n; int s; bool f=false; void dfs(long long k原创 2015-03-11 14:53:35 · 335 阅读 · 0 评论 -
POJ3984 迷宫问题(DFS)
点击打开链接 Description 定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, }; 它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要原创 2015-10-15 19:17:50 · 409 阅读 · 0 评论 -
POJ3278 Catch That Cow(BFS)
点击打开链接 Description Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at原创 2015-10-15 19:12:45 · 332 阅读 · 0 评论 -
HDOJ1010 Tempter of the Bone(DFS)
Tempter of the Bone The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He原创 2015-10-10 10:46:29 · 334 阅读 · 0 评论