
lca
天涯-沧海
acmer
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
2017 icpc青岛 j Suffix
思路:正解应该是nlogn的,暴力最坏n^3,一些博客的二分其实也是n^2的 具体做法就是在比较两个字符串大小时先hash然后二分找最长相同部分,再判断下一个位置大小 Consider n given non-empty strings denoted by s1 , s2 , · · · , sn . Now for each of them, you need to select a corresponding suffix, denoted by suf1, suf2...原创 2020-05-16 02:28:09 · 325 阅读 · 0 评论 -
(lca)Nearest Common Ancestors POJ 1330
Description A rooted tree is a well-known data structure in computer science and engineering. An example is shown below: In the figure, each node is labeled with an integer from {1, 2,...,16}. Node 8...原创 2019-10-19 15:26:25 · 142 阅读 · 0 评论