![](https://img-blog.csdnimg.cn/20190927151124774.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
数据结构:LCA
数据结构:LCA
LSD20164388
如果你过几天就忘了,那么你并没有真正的掌握。
展开
-
Codeforces Round #629 (Div. 3) E. Tree Queries(LCA+思维)
E. Tree Queriestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a rooted tree consisting ofnnvertices numbered fr...原创 2020-04-04 21:25:21 · 581 阅读 · 0 评论 -
2018年3月18日训练日记
500道题刚做了140道就开始做不动了。。。估计要凉。。。还是先把LCA看完。。。(以下内容 by 路人黑的纸巾,写的十分详细)LCA(Lowest Common Ancestors),即最近公共祖先 在一棵树上,两个节点的深度最浅的公共祖先就是LCA (自己可以是自己的祖先) 其实LCA的用途很广,我个人认为OI里用LCA最多的像是这样子的题: 给你一棵树(或者是一个图求完MST的树,这种会比较...原创 2018-03-18 21:20:01 · 265 阅读 · 0 评论 -
HDU 5296 Annoying problem(LCA+DFS序+思维)
Annoying problemTime Limit: 16000/8000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1906 Accepted Submission(s): 632 Problem DescriptionCoco has a tree,...原创 2018-07-18 13:15:32 · 293 阅读 · 0 评论 -
Gym - 101808K Another Shortest Path Problem (LCA+思维)
K. Another Shortest Path Problemtime limit per test3.0 smemory limit per test256 MBinputstandard inputoutputstandard outputShortest path problems have always been a part of competiti...原创 2018-07-18 14:06:12 · 505 阅读 · 0 评论 -
HDU 6393 Traffic Network in Numazu(LCA+思维+(树上差分)树状数组)
Traffic Network in NumazuTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 239 Accepted Submission(s): 87 Problem DescriptionChika is...原创 2018-08-14 10:10:35 · 235 阅读 · 0 评论 -
ACM-ICPC 2018 徐州赛区网络预赛 J Maze Designer (最大生成树+LCA)
After the long vacation, the maze designer master has to do his job. A tour company gives him a map which is a rectangle. The map consists of N \times MN×M little squares. That is to say, the height o...原创 2018-09-09 17:25:42 · 323 阅读 · 0 评论