
搜索_bfs
SCUT_Pein
这个作者很懒,什么都没留下…
展开
-
HDU1224--Free DIY Tour--广度优先搜索+剪枝
DescriptionWeiwei is a software engineer of ShiningSoft. He has just excellently fulfilled a software project with his fellow workers. His boss is so satisfied with their job that he decide to pro原创 2013-02-02 00:36:46 · 1013 阅读 · 0 评论 -
POJ3414--Pots
DescriptionYou are given two pots, having the volume of A and B liters respectively. The following operations can be performed:FILL(i) fill the pot i (1 ≤ i ≤ 2) from the tap;DROP(i)原创 2013-02-28 22:13:41 · 662 阅读 · 0 评论 -
Game
DescriptionBob always plays game with Alice. Today, they are playing a game on a tree. Alice has m1stones, Bob has m2 stones. At the beginning of the game, all the stones are placed on the nodes原创 2013-03-11 15:58:57 · 844 阅读 · 0 评论 -
POJ3126--Prime Path
DescriptionThe ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices. — It i原创 2013-02-26 00:30:17 · 403 阅读 · 0 评论 -
POJ2251--Dungeon Master--广搜
DescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit原创 2013-02-25 23:08:43 · 430 阅读 · 0 评论 -
POJ3278--Catch That Cow
DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a pointN (0 ≤ N ≤ 100,000) on a number line and the cow is at a point原创 2013-02-25 23:30:46 · 416 阅读 · 0 评论 -
codeForces 35C
Descriptioninputinput.txtoutputoutput.txtAfter a terrifying forest fire in Berland a forest rebirth program was carried out. Due to it N rows with M trees each were planted and原创 2013-02-25 08:38:42 · 1757 阅读 · 0 评论 -
POJ1111--Image Perimeters--广搜
DescriptionTechnicians in a pathology lab analyze digitized images of slides. Objects on a slide are selected for analysis by a mouse click on the object. The perimeter of the boundary of an object原创 2013-02-22 20:14:27 · 554 阅读 · 0 评论 -
POJ3087--Shuffle'm Up
DescriptionA common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is performed by starting with two stacks of poker chips, S1 and S2, each stack conta原创 2013-03-04 20:42:08 · 505 阅读 · 0 评论 -
POJ1426-Find The Multiple
转载请注明出处:優YoU http://user.qzone.qq.com/289065406/blog/1303946967大致题意:给出一个整数n,(1 解题思路:首先暴力枚举肯定是不可能的 1000ms 想不超时都难,而且枚举还要解决大数问题。。要不是人家把这题放到搜索,怎么也想不到用BFS。。。 解题方法: BFS+同余模定理 不说废话。转载 2013-03-04 19:58:00 · 416 阅读 · 0 评论 -
POJ3083--Children of the Candy Corn
DescriptionThe cornfield maze is a popular Halloween treat. Visitors are shown the entrance and must wander through the maze facing zombies, chainsaw-wielding psychopaths, hippies, and other terro原创 2013-03-04 10:23:30 · 571 阅读 · 0 评论 -
预处理的广搜
DescriptionPetka thought of a positive integer n and reported to Chapayev the sum of its digits and the sum of its squared digits. Chapayev scratched his head and said: "Well, Petka, I won't find原创 2014-03-17 18:37:44 · 579 阅读 · 0 评论