
搜索-BFS
文章平均质量分 75
STILLxjy
不要让任何人打乱你生活的节奏
展开
-
(POJ2251) Dungeon Master <3维 BFS>
Dungeon Master DescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to原创 2016-11-20 17:41:45 · 460 阅读 · 0 评论 -
(VUa 11624)Fire! -- BFS
题目连接: http://acm.hust.edu.cn/vjudge/problem/28833题意: 你的任务是帮助Joe走出一个大火蔓延的迷宫。joe每分钟可以走上下左右四个方向的相邻格子,而所有着火的格子每分钟都会向四周扩散。迷宫有些障碍joe和火到不能到达,我们认为当joe走到边界格子时就已经出了迷宫了。问最少的走出迷宫的时间,如果不能则输出:IMPOSSIBLE分析: 如...原创 2018-03-28 10:05:12 · 222 阅读 · 0 评论 -
(CCF 201409-4)最优配餐 [简单多源点BFS]
问题描述 栋栋最近开了一家餐饮连锁店,提供外卖服务。随着连锁店越来越多,怎么合理的给客户送餐成为了一个急需解决的问题。 栋栋的连锁店所在的区域可以看成是一个n×n的方格图(如下图所示),方格的格点上的位置上可能包含栋栋的分店(绿色标注)或者客户(蓝色标注),有一些格点是不能经过的(红色标注)。 方格图中的线表示可以行走的道路,相邻两个格点的距离为1。栋栋要送餐必须走可以行走的道路,原创 2017-10-25 15:07:47 · 607 阅读 · 0 评论 -
(POJ 2312)Battle City 优先队列 & 简单BFS
Battle City Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 9324 Accepted: 3086 DescriptionMany of us had played the game “Battle city” in our childhood, and some people (like me原创 2017-10-07 23:06:36 · 442 阅读 · 0 评论 -
(HDU Tempter of the Bone II) BFS + 可捡炸弹炸墙的迷宫问题
Tempter of the Bone II Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 98304/32768 K (Java/Others) Total Submission(s): 1090 Accepted Submission(s): 272Problem Description The doggie fou转载 2017-05-17 23:11:18 · 778 阅读 · 1 评论 -
(HDU 1429)胜利大逃亡(续) BFS + 二进制状态压缩
胜利大逃亡(续) Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 8588 Accepted Submission(s): 3085Problem Description Ignatius再次被魔王抓走了(搞不懂他咋这么讨魔王喜原创 2017-05-08 22:39:06 · 407 阅读 · 0 评论 -
(HDU 1664)Different Digits BFS + 数论 + 余数判重 详细题解
Different Digits Time Limit: 10000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1628 Accepted Submission(s): 470Problem Description Given a positive int原创 2017-05-13 22:06:49 · 641 阅读 · 0 评论 -
(HDU 1226)超级密码 BFS 同余模应用
级密码 Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 4375 Accepted Submission(s): 1405Problem Description Ignatius花了一个星期的时间终于找到了传说中的宝藏,宝藏原创 2017-05-11 23:41:16 · 989 阅读 · 0 评论 -
(CF 788)C. The Great Mixing <BFS>
题目链接: http://codeforces.com/problemset/problem/788/CC. The Great Mixingtime limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Sasha and Kolya decid原创 2017-04-05 20:23:22 · 1006 阅读 · 0 评论 -
(POJ 1753)Flip Game <状压+BFS>
Flip Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 42341 Accepted: 18250 DescriptionFlip game is played on a rectangular 4x4 field with two-sided pieces placed on each原创 2017-01-12 19:02:31 · 465 阅读 · 0 评论 -
(POJ3414)Pots <BFS, 记录路径>
Pots DescriptionYou are given two pots, having the volume of A and B liters respectively. The following operations can be performed:FILL(i) fill the pot i (1 ≤ i ≤ 2) from the tap; DROP(i)原创 2016-11-21 19:03:50 · 563 阅读 · 0 评论 -
(POJ1426)Find The Multiple <BFS 大数模>
Find The Multiple 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 and 1. You may assume that n is n原创 2016-11-21 14:16:56 · 378 阅读 · 0 评论 -
(POJ3126) Prime Path <BFS>
Prime Path DescriptionThe ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices.原创 2016-11-21 14:05:24 · 398 阅读 · 0 评论 -
(LeetCode 934)最短的桥 [简单DFS + BFS]
934. 最短的桥在给定的二维二进制数组 A 中,存在两座岛。(岛是由四面相连的 1 形成的一个最大组。)现在,我们可以将 0 变为 1,以使两座岛连接起来,变成一座岛。返回必须翻转的 0 的最小数目。(可以保证答案至少是 1。)示例 1:输入:[[0,1],[1,0]]输出:1示例 2:输入:[[0,1,0],[0,0,0],[0,0,1]]输出:2示例 3:输入:[[1,...原创 2018-12-29 17:06:20 · 666 阅读 · 0 评论