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 |
我的思路看看x和y谁距离根节点尽,若x比较近,则 :(1)先判断x是否为y的祖先; (2)否则令x=x的祖先; (3)反复 大家看一下吧,是这样么,我是用一维数组装的父亲节点,一次AC Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator