
BFS
qiuxueming_csdn
喜欢编程
展开
-
hdu 1728 BFS 逃离迷宫 值得注意
给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中,gloria不能走到迷宫外面去。令人头痛的是,gloria是个没什么方向感的人,因此,她在行走过程中,不能转太多弯了,否则她会晕倒的。我们假定给定的原创 2015-09-15 00:10:17 · 376 阅读 · 0 评论 -
POJ 3414 POTS BFS
You 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) empty the po原创 2015-09-15 11:52:01 · 345 阅读 · 0 评论