随笔分类 -  BFS

摘要:简单BFShttp://acm.fzu.edu.cn/problem.php?pid=2150/************************************************* Author :Powatr* Created Time :2015-8-23 12:3... 阅读全文
posted @ 2015-08-23 19:08 Painting、时光 阅读(119) 评论(0) 推荐(0)
摘要:http://poj.org/problem?id=2251/*简单bfs,向六个方向拓展*//************************************************* Author :Powatr* Created Time :2015-8-9 9:23:... 阅读全文
posted @ 2015-08-09 10:46 Painting、时光 阅读(144) 评论(0) 推荐(0)
摘要:Problem DescriptionThere arensoda conveniently labeled by1,2,…,n. beta, their best friends, wants to invite some soda to go hiking. Thei-th soda will ... 阅读全文
posted @ 2015-08-06 18:37 Painting、时光 阅读(153) 评论(0) 推荐(0)
摘要:Problem DescriptionIn ann∗mmaze, the right-bottom corner is the exit (position(n,m)is the exit). In every position of this maze, there is either a0or ... 阅读全文
posted @ 2015-08-01 15:08 Painting、时光 阅读(133) 评论(0) 推荐(0)
摘要:Problem Description小明误入迷宫,塞翁失马焉知非福,原来在迷宫中还藏着一些财宝,小明想获得所有的财宝并离开迷宫。因为小明还是学生,还有家庭作业要做,所以他想尽快获得所有财宝并离开迷宫。Input有多组测试数据。每组数据第一行给出两个正整数n,m(0#include#include#... 阅读全文
posted @ 2015-04-28 19:40 Painting、时光 阅读(194) 评论(0) 推荐(0)
摘要:DescriptionYou've gotten ann × msheet of squared paper. Some of its squares are painted. Let's mark the set of all painted squares asA. SetAis connect... 阅读全文
posted @ 2015-04-17 19:48 Painting、时光 阅读(243) 评论(0) 推荐(0)
摘要:Superbot is an interesting game which you need to control the robot on an N*M grid map.As you see, it's just a simple game: there is a control panel w... 阅读全文
posted @ 2015-04-14 20:28 Painting、时光 阅读(223) 评论(0) 推荐(0)
摘要:DescriptionThe Borg is an immensely powerful race of enhanced humanoids from the delta quadrant of the galaxy. The Borg collective is the term used to... 阅读全文
posted @ 2015-03-24 14:37 Painting、时光 阅读(123) 评论(0) 推荐(0)
摘要:http://poj.org/problem?id=3126大意:从一个素数到另一个素数,每次只能改变一个数,要求每次改变后的数都是素数,要求算出转换的最小次数,简单BFS,不过注意d要还原/************************************************* Auth... 阅读全文
posted @ 2015-03-22 16:06 Painting、时光 阅读(163) 评论(0) 推荐(0)
摘要:DescriptionGiven a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 a... 阅读全文
posted @ 2015-03-21 20:01 Painting、时光 阅读(107) 评论(0) 推荐(0)
摘要: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... 阅读全文
posted @ 2015-03-15 17:42 Painting、时光 阅读(165) 评论(0) 推荐(0)