题意:
‘#’是墙 ,F是火,S起始点,人一秒走一格,火也是1秒扩散一格,问在给定的时间T内是否人可以逃出去。
思路:
很明显两次bfs 第一次先求出火扩散到每个格子时的 时刻。第二次在对人进行bfs的时候就多了个条件,那就是人不能走大于等于着火时刻的点。 开始竟然以为是1个火点!!!!!悲剧啊 。。。知道这个后就没啥了。。。。
AC:
/*=============================================================================
#
# Author: liangshu - cbam
#
# QQ : 756029571
#
# School : 哈尔滨理工大学
#
# Last modified: 2015-09-07 21:06
#
# Filename: hdu1015.cpp
#
# Description:
# The people who are crazy enough to think they can change the world, are the ones who do !
=============================================================================*/
#
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include