![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
BFS
H煊
缓一会儿。。。
展开
-
poj1915 Knight Moves(bfs)
Description Background Mr Somurolov, fabulous chess-gamer indeed, asserts that no one else but him can move knights from one position to another so fast. Can you beat him? The Problem Your ta原创 2017-07-10 18:14:29 · 296 阅读 · 0 评论 -
ZOJ1079-Robotic Jigsaw(bfs)
Robotic Jigsaw Time Limit: 2 Seconds Memory Limit: 65536 KB Statement of the Problem Your task here is to write a program to aid in the assembly of a jigsaw puzzle by a robot. The puzzl原创 2017-07-11 22:09:41 · 267 阅读 · 0 评论 -
ZOJ 1148 The Game(bfs)
The Game Time Limit: 2 Seconds Memory Limit: 65536 KB One morning, you wake up and think: ``I am such a good programmer. Why not make some money?'' So you decide to write a computer game.原创 2017-08-17 12:55:07 · 624 阅读 · 1 评论 -
ZOJ 1103 Hike on a Graph(bfs)
Hike on a Graph Time Limit: 2 Seconds Memory Limit: 65536 KB "Hike on a Graph" is a game that is played on a board on which an undirected graph is drawn. The graph is complete and has all原创 2017-08-17 18:52:06 · 287 阅读 · 0 评论 -
ZOJ 1129 Erdos Numbers(bfs)
Erdos Numbers Time Limit: 10 Seconds Memory Limit: 32768 KB The Hungarian Paul Erdos (1913�C1996, pronounced as ��Ar-dish��) was not only one of the strangest mathematicians of the 20th cen原创 2017-08-17 21:40:41 · 1185 阅读 · 0 评论 -
ZOJ 1136 Multiple(分支界限算法)
Multiple Time Limit: 10 Seconds Memory Limit: 32768 KB a program that, given a natural number N between 0 and 4999 (inclusively), and M distinct decimal digits X1,X2..XM (at least one), f原创 2017-08-18 12:42:37 · 740 阅读 · 0 评论 -
NYOJ-92 图像有用区域(bfs)
图像有用区域 时间限制:3000 ms | 内存限制:65535 KB 难度:4 描述 “ACKing”同学以前做一个图像处理的项目时,遇到了一个问题,他需要摘取出图片中某个黑色线圏成的区域以内的图片,现在请你来帮助他完成第一步,把黑色线圏外的区域全部变为黑色。 图1原创 2017-08-12 22:23:08 · 246 阅读 · 0 评论 -
蓝桥杯 九宫重排(八数码问题)
历届试题 九宫重排 时间限制:1.0s 内存限制:256.0MB 问题描述 如下面第一个图的九宫格中,放着 1~8 的数字卡片,还有一个格子空着。与空格子相邻的格子中的卡片可以移动到空格中。经过若干次移动,可以形成第二个图所示的局面。 我们把第一个图的局面记为:12345678. 把第二个图的局面记为:123.46758原创 2017-08-23 20:47:36 · 717 阅读 · 0 评论 -
2016 ACM-ICPC Asia Regional B – Help the Princess!(bfs)
B – Help the Princess! 一个n * m的地图,有个若干坏蛋和主角,主角需要到达出口才能得救,主角和坏蛋每秒都可以选择往四周走或者停留不动,求主角是否存在一条路径到达出口,这条路径无论坏蛋怎么走都无法阻断! 思路:先用坏蛋去bfs出到每个位置的最小时间,然后在bfs主角,主角所走的每步的时间都需要 代码: #include using原创 2017-09-12 20:40:39 · 220 阅读 · 0 评论