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 455462586 at 2013-07-22 23:29:55 on Problem 3694
如果是用判父节点的方式就可以不用考虑重边。

如果是用判边的方式则需要考虑重边。

这里推荐前者。用fa[u]记录u的父节点,每次都判断一下fa[u] == v ?就ok了。

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