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:我的思路

Posted by cactuslrd at 2007-12-26 20:44:36 on Problem 1330
In Reply To:我的思路 Posted by:cactuslrd at 2007-12-26 20:42:38
> 看看x和y谁距离根节点尽,若x比较近,则
> :(1)先判断x是否为y的祖先;
>   (2)否则令x=x的祖先;
>   (3)反复(1)(2)过程
> 大家看一下吧,是这样么,我是用一维数组装的父亲节点,一次AC

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