Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

搞了4个多小时啊~~~~

Posted by 2011339960140 at 2013-03-07 17:30:18 on Problem 2329
搞了4个多小时啊~~~~   dfs要从不同方向,太烦,后来直接bfs,枚举距离,就是先将有值的点加入队列,然后开始广搜,这里要注意,只需要保存一个初始值,不用全部都保存下来,因为只要有两个距离一样的初始值,他就是0。就这里,搞了半天~~~~~ T^T

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator