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

把已有通路的值改为0,就可以轻松避开Q条路径有环的问题

Posted by go4fun at 2009-04-17 16:46:02 on Problem 2421
一开始为了容易区分,把已有通路的值赋为-1,结果发现Q条路径可能有环,应付起来比较不简便,所以直接改成0,能够巧妙解决。

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