Fighting!

欲戴皇冠,必承其重!

[牛客网#35D 树的距离]离散化+线段树合并

[牛客网#35D 树的距离]离散化+线段树合并 题意描述:wyf非常喜欢树。一棵有根数树上有nn个节点,11号点是他的根,每条边都有一个距离,而wyf是个爱问奇怪问题的熊孩子,他想知道对于某个点xx,以xx为根的子树上,所有与xx距离大于等于kk的点与xx的距离之和。 解题思路:对每个节点建一个...

2017-11-29 17:28:11

阅读数 308

评论数 0

[Codeforces 893F. Subtree Minimum Query]线段树合并

[Codeforces 893F. Subtree Minimum Query]线段树合并分类:Data Structure SegMent Tree Merge 1. 题目链接[Codeforces 893F. Subtree Minimum Query]2. 题意描述一个nn个节点的有根树,每...

2017-11-28 22:01:47

阅读数 647

评论数 1

[Codeforeces 894E. Ralph and Mushrooms] 缩点+拓扑

[Codeforeces 894E. Ralph and Mushrooms] 缩点+拓扑分类:Data Structure SegMent Tree template 1. 题目链接[Codeforeces 894E. Ralph and Mushrooms]2. 题意描述nn个顶点mm条边的有...

2017-11-24 10:08:23

阅读数 310

评论数 0

[Codeforces 894D. Ralph And His Tour in Binary Country]预处理+二分

[Codeforces 894D. Ralph And His Tour in Binary Country]预处理+二分分类:Tree binary search1. 题目链接[Codeforces 894D. Ralph And His Tour in Binary Country] 2. 题...

2017-11-23 11:47:43

阅读数 355

评论数 0

[hdu 6230 Palindrome] Manacher+树状数组

[hdu 6230 Palindrome] Manacher+树状数组分类:Data Structure Manacher FenwickedTree 1. 题目链接[hdu 6230 Palindrome] 2. 题意描述给定一个字符串,统计有多少个子串是one−and−half palindr...

2017-11-15 16:20:16

阅读数 1196

评论数 0

[CodeForces877 E. Danil and a Part-time Job]dfs序+线段树

[CodeForces877 E.Danil and a Part-time Job]dfs序+线段树分类:Data Structure SegMent Tree dfn 1. 题目链接[CodeForces877 E. Danil and a Part-time Job]2. 题意描述有一棵nn...

2017-11-10 10:50:27

阅读数 195

评论数 0

[hdu 6191 Query on A Tree] 字典树启发式合并

[hdu 6191 Query on A Tree] 字典树启发式合并分类:Data Structure Trie Tree1. 题目链接[hdu 6191 Query on A Tree]2. 题意描述有一个棵nn个节点的树,每个节点上有一个权值。然后是,qq个询问,每次查询包含两个数u,xu,...

2017-11-08 13:21:13

阅读数 319

评论数 0

提示
确定要删除当前文章?
取消 删除