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

Re:同问!有谁能给解释一下此题的排序二分算法么? thanks!!!

Posted by xuhanqiu at 2009-09-16 08:43:04 on Problem 1330
In Reply To:同问!有谁能给解释一下此题的排序二分算法么? thanks!!! Posted by:orangeman at 2009-09-06 05:54:54
> 怎么排序, 怎么二分?
   估计所谓的排序,二分……就是判断v的祖先在不在u的祖先列表L中。。暴力查找导致复杂度是O(n^2). 二分可以不超时。。 但其实直接一个flag[.]就可以了,hash思想……O(n) -.-

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