
搜索
搜索
皮皮皮皮皮皮皮卡乒
Java编程爱好者,在优快云和大家一起进步,互相交流分享学习。
展开
-
HDU1016Prime Ring Problem(深搜)
A ring is compose of n circles as shown in diagram. Put natural number 1, 2, …, n into each circle separately, and the sum of numbers in two adjacent circles should be a prime. Note: the number of fi...原创 2020-03-07 11:08:37 · 144 阅读 · 0 评论 -
HDU1241Oil Deposits(DFS)
The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a grid that divides th...原创 2020-02-20 20:11:34 · 210 阅读 · 0 评论 -
HDU1253 胜利大逃亡(BFS)
Ignatius被魔王抓走了,有一天魔王出差去了,这可是Ignatius逃亡的好机会. 魔王住在一个城堡里,城堡是一个ABC的立方体,可以被表示成A个B*C的矩阵,刚开始Ignatius被关在(0,0,0)的位置,离开城堡的门在(A-1,B-1,C-1)的位置,现在知道魔王将在T分钟后回到城堡,Ignatius每分钟能从一个坐标走到相邻的六个坐标中的其中一个.现在给你城堡的地图,请你计算出Igna...原创 2020-02-20 19:55:36 · 118 阅读 · 0 评论 -
POJ 3050 Hopscotch(深搜)
The cows play the child’s game of hopscotch in a non-traditional way. Instead of a linear set of numbered boxes into which to hop, the cows create a 5x5 rectilinear grid of digits parallel to the x an...原创 2020-02-14 16:10:29 · 207 阅读 · 0 评论 -
深搜(dfs)和广搜(bfs)
基础讲述: 在讲深搜之前我们先来假设有这样几条路径1->2;1->3;1->5;2->4;3->5; 深搜就是说从一个带你开始找他的第一个和他相连的一条边找到后标记从他找到的标记的点开始找下一个与标记的相连的点,这一次搜索结束的标志是找不到其他的没有被找到的点了开始返回到最开始点即返回到1找它的其他出边3按照上述步骤继续往下找直到找到1的最后一个点的最后一个点; 完整...原创 2019-11-13 20:27:52 · 361 阅读 · 0 评论 -
深度优先搜索————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 realized that the bone ...原创 2019-08-01 09:09:29 · 157 阅读 · 0 评论 -
poj--1979Red and Black(深搜)
题目: There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he ...原创 2019-09-04 19:19:17 · 154 阅读 · 0 评论