bzoj 3238 差异

题目传送门:https://www.lydsy.com/JudgeOnline/problem.php?id=3238
后缀数组+单调队列
这是一道后缀数组的模板题。
简单来说,就是先用后缀数组求出h数组。
然后利用单调队列在o(n)的时间复杂度下求出任意两个后缀的最大公共前缀长度的和。
大家看代码理解吧。

2 条评论
  1. My spouse and i ended up being quite happy that Albert could round up his studies through the entire ideas he made using your web page. It is now and again perplexing just to find yourself offering instructions that people today have been making money from. And we also fully understand we now have the website owner to be grateful to for this. The specific explanations you’ve made, the straightforward site navigation, the relationships you will give support to foster – it is mostly great, and it is letting our son and our family reckon that the subject is entertaining, and that’s very important. Thanks for the whole thing!

  2. I want to express some appreciation to you for bailing me out of this particular instance. Just after searching throughout the the web and seeing recommendations that were not pleasant, I assumed my entire life was done. Living without the presence of approaches to the problems you’ve sorted out through your posting is a critical case, and the kind which could have in a wrong way affected my entire career if I hadn’t noticed your web page. The skills and kindness in touching almost everything was precious. I don’t know what I would have done if I hadn’t encountered such a thing like this. I can also at this point look forward to my future. Thanks for your time very much for this high quality and results-oriented guide. I will not think twice to endorse your blog post to any person who wants and needs guidance on this subject.

发表一条评论