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

非topsort解法

Posted by skywalker_q at 2010-09-28 21:24:24 on Problem 1094
这题我没用TOPSORT,而是先DFS找环,再DP一下找长链,最后再DFS构造出解即可时间复杂度
O(T*(N+M)),自己比较弱所以直接枚举的边就变成了O(T*(N*M))

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