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 wukewen at 2014-04-07 21:11:52 on Problem 1236
WA了好几次才发现问题。
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
我们统计入度为0的点个数s1,出度为0的点个数s2
如果整个图是一个强连通分量,那么所有点都有入度和出度
增加一条边可以使一个点入度+1,另一个点出度+1
所以max(s1,s2)即可保证所有的点都有出入度

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