BFS
Lngxling
这个作者很懒,什么都没留下…
展开
-
POJ - 3278 Catch That Cow ——BFS
Catch That Cow Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 97906 Accepted: 30748 Description Farmer John has been informed of the location of a fugit原创 2017-09-13 11:43:57 · 221 阅读 · 0 评论 -
POJ - 3984 迷宫问题 —— BFS记录路径
迷宫问题 Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 24702 Accepted: 14422 Description 定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0,原创 2017-09-13 16:21:33 · 263 阅读 · 0 评论 -
UVA - 11624 Fire! ——BFS
Joe works in a maze. Unfortunately, portions of the maze have caught on fire, and the owner of the maze neglected to create a fire escape plan. Help Joe escape the maze. Given Joe’s location in the原创 2017-09-13 16:25:27 · 276 阅读 · 0 评论 -
POJ - 3126 Prime Path —— BFS
Prime Path Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 23030 Accepted: 12756 Description The ministers of the cabinet were quite upset by the message原创 2017-09-13 16:42:33 · 188 阅读 · 0 评论 -
FZU - 2150 Fire Game —— BFS
Problem 2150 Fire Game Accept: 2713 Submit: 9264 Time Limit: 1000 mSec Memory Limit : 32768 KB Problem Description Fat brother and Maze are playing a kind of special (hentai) game o原创 2017-09-14 15:24:36 · 272 阅读 · 0 评论 -
CodeForces - 813C The Tag Game —— BFS DFS
C. The Tag Game time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Alice got tired of playing the tag game by t原创 2017-09-14 21:07:09 · 285 阅读 · 0 评论 -
CodeForces - 330D Biridian Forest —— BFS 逆搜
D. Biridian Forest time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You're a mikemon breeder currently in th原创 2017-09-27 20:58:10 · 410 阅读 · 0 评论 -
POJ - 2312 Battle City —— bfs
题意: 从Y走到T的最短路径,走E和T需要一秒,B需要两秒,R和S不能走 思路: bfs一下,记录到每个点的最短路径长度 #include <iostream> #include <queue> #include <cstring> #include <cstdio> using namespace std; #define mod 100...原创 2018-08-30 13:00:14 · 184 阅读 · 0 评论 -
HDU - 1495 非常可乐 —— bfs
思路: 有三个容器,每个最大是100,共有100*100*100=1e6种状态,深搜记录一下每种状态和这种状态的最小步数 深搜时遍历每个容器,如果这个容器里有可乐,就尝试着倒入另外两个容器里 #include <iostream> #include <cstdio> #include <cmath> #include <vector> #in...原创 2018-09-07 09:50:28 · 225 阅读 · 0 评论