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 |
正确的办法是用优先队列不是队列如果用队列,碰巧有些方向顺序可以过,但是优先队列不需要,需要注意的一点是将队头pop出来之后再去改vis=1,不是push 的时候就让vis=1,否则如果有更少的segment,无法加到队列中。 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator