Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
搞了4个多小时啊~~~~搞了4个多小时啊~~~~ dfs要从不同方向,太烦,后来直接bfs,枚举距离,就是先将有值的点加入队列,然后开始广搜,这里要注意,只需要保存一个初始值,不用全部都保存下来,因为只要有两个距离一样的初始值,他就是0。就这里,搞了半天~~~~~ T^T Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator