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 |
不需要treedp...选一个度最大的节点做根..然后DFS一次记录下每个节点下的儿子数.. 然后再枚举每个点.这么算一下就可以了..虽然最坏情况O(n^2)..不过数据比较弱.. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator