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

正确的办法是用优先队列不是队列

Posted by yangyangc at 2018-07-05 20:51:21 on Problem 1101
如果用队列,碰巧有些方向顺序可以过,但是优先队列不需要,需要注意的一点是将队头pop出来之后再去改vis=1,不是push 的时候就让vis=1,否则如果有更少的segment,无法加到队列中。

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