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 ljfljf2006 at 2009-12-04 21:54:15 on Problem 1944
如果去掉最后一个顶点可以和第一个顶点相连这个条件,那么该怎么解?
O(P)的贪心就可以了。
因为答案必定是无环的,那么枚举断点,然后采用贪心,就可以得到O(np)的解法。

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