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 RoBa at 2007-10-07 21:48:42 on Problem 3417
In Reply To:Re:up Posted by:cuiaoxiang at 2007-10-07 12:45:32
> f[x]表示从x到root的每条边都加f[x]
> 那么x---y的每条边加1
> 就可以用f[x]++, f[y]++, f[LCA(x,y)]-=2;来表示
> 最后treeDP一下,统计每条边的值就可以了

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