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 |
堆维护~用一个堆维护最低高度。先将四周的高度加入堆中。每次选取当前高度最低的点出堆作为源点,并访问它上下左右的点,如果未被访问过则将其加入堆中并标记为已访问。在此前提下若该点高度比源点低,则inc(ans,△H),并将该点高度修改为与源点相同。当堆空时退出程序。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator