Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
非topsort解法这题我没用TOPSORT,而是先DFS找环,再DP一下找长链,最后再DFS构造出解即可时间复杂度 O(T*(N+M)),自己比较弱所以直接枚举的边就变成了O(T*(N*M)) Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator