[2016-04-04][codeforces][639][B][Bear and Forgotten Tree 3]
摘要:
时间:2016-04-04 13:11:25 星期一 题目编号:[2016-04-04][codeforces][639][B][Bear and Forgotten Tree 3] 题目大意:一棵树有n个节点,直径为d,直径为h,问,这样的树是否存在,是则输出任意一棵树的所有边 分析: 树的高度是h,那么树的直径最大为2h 所以d⩽2×hd⩽2×h 所以只需要生成第一个枝条深度为h,其他枝条... 阅读全文
posted @ 2016-04-04 23:40 红洋 阅读(81) 评论(0) 推荐(0)