
BFS
gx翔鸽
革命尚未成功,同志任需努力,先改造自己
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LightOJ 1141—— Number Transformation【质因数分解,BFS】
In this problem, you are given an integer number s. You can transform any integer number A to another integer number B by adding x to A. This x is an integer number which is a prime factor of A (pleas...原创 2018-08-04 23:28:24 · 460 阅读 · 0 评论 -
Codeforces Round #516 (Div. 2, by Moscow Team Olympiad)D. Labyrinth·「BFS」
D. Labyrinth time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output You are playing some computer game. One of its levels puts you in a ...原创 2018-10-23 23:30:55 · 165 阅读 · 0 评论 -
POJ3984——迷宫问题【BFS,记录路径】
迷宫问题 Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 33319 Accepted: 18985 Description 定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, ...原创 2018-08-02 23:41:07 · 184 阅读 · 0 评论 -
hdu1312——Red and Black【DFS/BFS】
Red and Black Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 25836 Accepted Submission(s): 15596 Problem Description There is a rectan...原创 2018-08-02 23:17:07 · 159 阅读 · 0 评论 -
poj2251——Dungeon Master 【BFS】
Description - 题目描述 [NWUACM] 你被困在一个三维的空间中,现在要寻找最短路径逃生! 空间由立方体单位构成 你每次向上下前后左右移动一个单位需要一分钟 你不能对角线移动并且四周封闭 是否存在逃出生天的可能性?如果存在,则需要多少时间? Input - 输入 输入第一行是一个数表示空间的数量。 每个空间的描述的第一行为L,R和C(皆不超过30)。 L表示空间...原创 2018-08-02 23:13:26 · 149 阅读 · 0 评论 -
poj1573——Robot Motion【BFS】
Robot Motion Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 15703 Accepted: 7439 Description A robot has been programmed to follow...原创 2018-07-31 23:57:58 · 150 阅读 · 0 评论 -
poj3278——Catch That Cow【BFS】
Catch That Cow Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 117541 Accepted: 36698 Description Farmer John has been informed of the loca...原创 2018-07-31 23:52:50 · 128 阅读 · 0 评论 -
poj2312——Battle City【BFS】
Battle City Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 9931 Accepted: 3301 Description Many of us had played the game "Battle city" in ...原创 2018-07-31 23:47:53 · 333 阅读 · 0 评论 -
HDU1242——Rescue【BFS】
Rescue Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 36992 Accepted Submission(s): 12845 Problem Description Angel was caught by the ...原创 2018-07-31 23:43:15 · 168 阅读 · 0 评论 -
HDU - 1372 ——Knight Moves【BFS】
A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of n squares on a chessboa...原创 2018-08-04 23:32:50 · 174 阅读 · 0 评论 -
HDU3085——Nightmare Ⅱ【双向BFS】
Nightmare Ⅱ 双向BFS板子题记录一下。 #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <queue> using namespace std; typedef pair<int,int&...原创 2018-12-31 19:01:56 · 169 阅读 · 0 评论