随笔分类 - BFS
摘要:简单BFShttp://acm.fzu.edu.cn/problem.php?pid=2150/************************************************* Author :Powatr* Created Time :2015-8-23 12:3...
阅读全文
摘要:http://poj.org/problem?id=2251/*简单bfs,向六个方向拓展*//************************************************* Author :Powatr* Created Time :2015-8-9 9:23:...
阅读全文
摘要:Problem DescriptionThere arensoda conveniently labeled by1,2,…,n. beta, their best friends, wants to invite some soda to go hiking. Thei-th soda will ...
阅读全文
摘要: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 ...
阅读全文
摘要:Problem Description小明误入迷宫,塞翁失马焉知非福,原来在迷宫中还藏着一些财宝,小明想获得所有的财宝并离开迷宫。因为小明还是学生,还有家庭作业要做,所以他想尽快获得所有财宝并离开迷宫。Input有多组测试数据。每组数据第一行给出两个正整数n,m(0#include#include#...
阅读全文
摘要: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...
阅读全文
摘要: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...
阅读全文
摘要: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...
阅读全文
摘要:http://poj.org/problem?id=3126大意:从一个素数到另一个素数,每次只能改变一个数,要求每次改变后的数都是素数,要求算出转换的最小次数,简单BFS,不过注意d要还原/************************************************* Auth...
阅读全文
摘要: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...
阅读全文
摘要: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...
阅读全文

浙公网安备 33010602011771号