树的直径,重心,分治
qq_37383726
这个作者很懒,什么都没留下…
展开
-
Cow Marathon 【树的直径】
Description After hearing about the epidemic of obesity in the USA, Farmer John wants his cows to get more exercise, so he has committed to create a bovine marathon for his cows to run. The marathon r原创 2017-05-27 22:08:40 · 259 阅读 · 0 评论 -
Warm up 【tarjan 求EBC+求桥+缩点+树的直径】
Problem Description N planets are connected by M bidirectional channels that allow instant transportation. It’s always possible to travel between any two planets through these channels. If we can原创 2017-05-27 22:44:57 · 346 阅读 · 0 评论 -
Labyrinth 【迷宫图中 树的直径应用】
Labyrinth Time Limit: 2000MS Memory Limit: 32768K Total Submissions: 3990 Accepted: 1501 Description The northern part of the Pyramid contains a very large and complicated labyrinth. The l原创 2017-05-27 23:23:48 · 323 阅读 · 0 评论 -
Roads in the North 【树的直径】
Building and maintaining roads among communities in the far North is an expensive business. With this in mind, the roads are build such that there is only one route from a village to a village that doe原创 2017-06-15 23:52:14 · 180 阅读 · 0 评论 -
湫湫系列故事——设计风景线 【并查集判定环】+【求无环非连通图的树的直径】
随着杭州西湖的知名度的进一步提升,园林规划专家湫湫希望设计出一条新的经典观光线路,根据老板马小腾的指示,新的风景线最好能建成环形,如果没有条件建成环形,那就建的越长越好。 现在已经勘探确定了n个位置可以用来建设,在它们之间也勘探确定了m条可以设计的路线以及他们的长度。请问是否能够建成环形的风景线?如果不能,风景线最长能够达到多少? 其中,可以兴建的路线均是双向的,他们之间的长度均大于原创 2017-06-16 00:42:20 · 306 阅读 · 0 评论 -
【POJ - 1655】Balancing Act 【树形DP 求解树的重心】
Consider a tree T with N (1 <= N <= 20,000) nodes numbered 1…N. Deleting any node from the tree yields a forest: a collection of one or more trees. Define the balance of a node to be the size of the la原创 2017-10-15 00:33:21 · 302 阅读 · 0 评论 -
【CodeForces 686 D. 】 【树的重心性质】
D. Kay and Snowflake time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output After the piece of a devilish mirror hit the Kay’s eye, he is no原创 2017-10-15 21:26:51 · 588 阅读 · 0 评论 -
【POJ 3107 】Godfather 【树的重心】
Language: Godfather Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 7652 Accepted: 2701 DescriptionLast years Chicago was full of gangster fights and strange murders. The chief原创 2017-10-15 10:00:13 · 243 阅读 · 0 评论