生之、如舟
生之、如舟
全部文章
树论
动态规划(8)
博弈论(1)
图论(7)
基本算法(29)
并查集(17)
思维(3)
数学(14)
数据结构(5)
数论(18)
最短路(4)
枚举(1)
树状数组(13)
模板(7)
比赛(15)
算法总结(3)
线段树(11)
蓝桥杯(1)
贪心(1)
归档
标签
去牛客网
登录
/
注册
Ryuichi的算法博客
AC
全部文章
/ 树论
(共4篇)
D. Bandit in a City 【树+并查集】1900
D. Bandit in a City Bandits appeared in the city! One of them is trying to catch as many citizens as he can. The city consists of 𝑛 squares connected...
树提高题
2020-11-12
0
755
F. The Shortest Statement 【树,LCA,最短路】2400
F. The Shortest Statement You are given a weighed undirected connected graph, consisting of 𝑛 vertices and 𝑚 edges. You should answer 𝑞 queries, th...
树提高题
2020-11-11
0
617
B. Kay and Snowflake 【树的重心】1900
B. Kay and Snowflake B. Kay and SnowflakeAfter the piece of a devilish mirror hit the Kay's eye, he is no longer interested in the beauty of the roses...
树提高题
2020-11-11
0
738
CFdiv3#615F. Three Paths on a Tree 【树论】
F. Three Paths on a Tree 题意 给一个树,让在树上找三个结点A,B,C,使得ABC三个结点3条路径中出现的结点数最多 分析 因为这是一棵树,三条路径必定会有一个交点O,所以我们需要让OA+OB+OC的长度尽可能的长,而OA+OB我们可以直接认为是树的直径,OC认为是这条直径上...
树的直径
2020-02-01
0
698