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 ahbbxcy at 2011-12-12 19:50:43 on Problem 2762
我判断弱连通图的做法是
1,先对图中的强联通分量进行缩点。
2,计算图中每个点的入度和出度。
3,如果入度为0的点的个数和出度为0的点的个数都是1则判定这个图是弱连通图。

ms网上没有这样的解法,难道是有trick我没有考虑到?

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