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 hz02ruc at 2004-03-15 16:05:11 on Problem 1330
In Reply To:Re:直接向上遍历父节点就可以了,排序会超时 Posted by:Aimy at 2004-03-14 22:57:47
> 谢谢了,
> 改成了将节点排序之后,进行二分检索,过是过了,可是时间还费时间,
> 不知道怎样的数据结构好点?
> 我的直接就按照输入的那样结构做的。

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