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 |
是不是新路不能经过原来的点?我求lca然后对每一对点(u,v)找出len[u]+len[v]-2*len[lca[u][v]]-dist(u,v)最大的一个(len[u]是u到树根的树上距离,dist(u,v)是u,v的平面距离),打出来,为什么WA,有什么trick吗?Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator