bfs+基础图论
Nothing_227
Nothing is impossible!
展开
-
Knight Moves UVA - 439
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-07-23 15:25:19 · 203 阅读 · 0 评论 -
Fire! UVA - 11624
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 ma...原创 2018-07-18 10:38:12 · 162 阅读 · 0 评论 -
Patrol Robot UVA - 1600(可以看思路)
A robot has to patrol around a rectangular area which is in a form of m × n grid (m rows and n columns). The rows are labeled from 1 to m. The columns are labeled from 1 to n. A cell (i, j) denotes th...原创 2018-07-24 09:29:37 · 350 阅读 · 1 评论 -
BFS (Prime Path , POJ 3126)
基本都是一样的套路!!!!!!!!所以加深熟练度!!!!!!!! 部分题目如下:所有数都要求为素数,每次替换某一位数,得到目标数。 — In fact, I do. You see, there is this programming contest going on... Help the prime minister to find the cheapest prime path betw...原创 2019-03-28 22:25:45 · 144 阅读 · 0 评论 -
BFS -- Dungeon Master(POJ 2251)
You 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 move one unit north, south...原创 2019-03-28 15:13:24 · 172 阅读 · 0 评论 -
BFS求联通块——Red and Black (HDU 1312)
There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he can'...原创 2019-03-28 23:00:50 · 202 阅读 · 0 评论