F.A.Qs Home ProblemSet Status Ranklist Contest LoginRegister
Notice:1:注册本OJ方式请见https://www.lydsy.com/JudgeOnline/wttl/thread.php?tid=5671 2:请不要在讨论区中发空白主题帖。
大视野在线测评-欢迎您
[ New Thread ]
Problem 5420 >> http://uoj.ac/problem/398
save_code @ 2018-08-11 04:14:36
[ Quote ] [ Edit ] [ Delete ] 1#
应该是这样做的吧:

树形DP记录三条路径。。。 dp[root][s1][s2][s3][t1][t2][t3]
s1,s2,s3,t1,t2,t3<=k
然后 合并 两颗子树 链接 三条汉密尔顿路径就行了吧,没考虑错吧
save_code @ 2018-08-11 04:19:48
[ Quote ] [ Edit ] [ Delete ] 2#
类似的题目:

http://acm.timus.ru/problem.aspx?space=1&num=1763
当然这道要简单点
[Top] [Previous Page] [Next Page]

HOME Back