随笔分类 -  树的直径

摘要:Warm upTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 5093Accepted Submission(s): 1131Problem De... 阅读全文
posted @ 2015-10-13 14:16 非我非非我 阅读(220) 评论(0) 推荐(0) 编辑
摘要:1094 - Farthest Nodes in a TreePDF (English)StatisticsForumTime Limit:2 second(s)Memory Limit:32 MBGiven a tree (a connected graph with no cycles), yo... 阅读全文
posted @ 2015-09-10 21:44 非我非非我 阅读(350) 评论(0) 推荐(0) 编辑
摘要:树的直径:一棵树中从一个节点到另一个节点的一条最长的路径,这条路径可以只是这个树上的部分节点,也可以是所有节点(主要看这棵树的连接方式)在这个路径上任意节点的分岔不予考虑 求法:先任意选择一个节点a当做起点来找到距离这个点最远的端点b(这两点之间的路径上所有边的权值和最大),然后再以b节点为... 阅读全文
posted @ 2015-08-18 19:49 非我非非我 阅读(2346) 评论(0) 推荐(1) 编辑
摘要:ComputerTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4440Accepted Submission(s): 2236Problem De... 阅读全文
posted @ 2015-08-18 16:13 非我非非我 阅读(211) 评论(0) 推荐(0) 编辑
摘要:LabyrinthTime Limit:2000MSMemory Limit:32768KTotal Submissions:4004Accepted:1504DescriptionThe northern part of the Pyramid contains a very large and ... 阅读全文
posted @ 2015-08-18 11:37 非我非非我 阅读(213) 评论(0) 推荐(0) 编辑
摘要:Roads in the NorthTime Limit:1000MSMemory Limit:65536KTotal Submissions:2359Accepted:1157DescriptionBuilding and maintaining roads among communities i... 阅读全文
posted @ 2015-08-18 10:20 非我非非我 阅读(197) 评论(0) 推荐(0) 编辑
摘要:Cow MarathonTime Limit:2000MSMemory Limit:30000KTotal Submissions:4185Accepted:2118Case Time Limit:1000MSDescriptionAfter hearing about the epidemic o... 阅读全文
posted @ 2015-08-18 09:41 非我非非我 阅读(343) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示