
搜索
普通网友
这个作者很懒,什么都没留下…
展开
-
NYOJ927 The partial sum problem
搜索的入门,学会思想吧!原创 2014-11-16 09:37:53 · 450 阅读 · 0 评论 -
Find The Multiple
题意:寻找一个数,能除开所给的n,且这个数是由1或0组成的。则从1开始判断,每次是*10+1或*10则判断。考虑到用DFS,但是n#include#include#include#include#include#includeusing namespace std;long long n;int s;bool f=false;void dfs(long long k原创 2015-03-11 14:53:35 · 394 阅读 · 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 · 450 阅读 · 0 评论 -
POJ3278 Catch That Cow(BFS)
点击打开链接DescriptionFarmer 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 · 363 阅读 · 0 评论 -
HDOJ1010 Tempter of the Bone(DFS)
Tempter of the BoneThe 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 · 369 阅读 · 0 评论