码迷,mamicode.com
首页 > 其他好文 > 详细

codeforce 1059E Split the Tree

时间:2018-10-12 21:07:22      阅读:147      评论:0      收藏:0      [点我收藏+]

标签:htm   最优   style   .com   set   The   log   www.   round   

题目http://codeforces.com/problemset/problem/1059/E

参考http://www.cnblogs.com/waldenlake/p/9750249.html 

我也想到了贪心,从一个子叶a出发向上每一个都标记直至不满足条件,但其实一个点是可以被重复标记的visit是可以被覆盖的,总是下意识!visit,如果另一个子叶b向上爬得更远的话,经过a和b的父亲之后还能继续向地上爬,这总是能满足最优解。

 

codeforce 1059E Split the Tree

标签:htm   最优   style   .com   set   The   log   www.   round   

原文地址:https://www.cnblogs.com/LandingGuy/p/9780221.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!