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 killertom at 2007-08-18 10:23:48 on Problem 3352
In Reply To:这题思路是什么样的? 提示一下~~~ Posted by:df7009 at 2007-08-17 11:28:24
用dfs,搜索出满足下列两个条件之一的分支的数量count:
一,改分支只有一个结点;
二,该分支是强连通的;
然后这么想:这些分支里的每一个只要随便用一条边连到另外一个分支上,整个图就是强连通的了。

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