08 2019 档案
摘要:Aho Corasick algorithm Let there be a set of strings with the total length (sum of all lengths). The Aho Corasick algorithm constructs a data stru
阅读全文
摘要:<! ?title Finding repetitions Finding repetitions Given a string of length . A repetition is two occurrences of a string in a row. In other wor
阅读全文
摘要:Suffix Automaton A suffix automaton is a powerful data structure that allows solving many string related problems. For example, you can search for all
阅读全文
摘要:Z function and its calculation Suppose we are given a string of length . The Z function for this string is an array of length where the
阅读全文
摘要:Prefix function. Knuth–Morris–Pratt algorithm Prefix function definition You are given a string of length . The prefix function for this string
阅读全文
摘要:<! ?title Suffix Array Suffix Array Definition Let be a string of length . The th suffix of is the substring . A suffi
阅读全文
摘要:知识点 树状数组 解决问题类型: 单点更新,前缀查询,很简单地拓展到2维 复杂度即代码: python 例题 "UVA 12086 Potentiometers" "LOJ 1112 Curious Robin Hood" "LOJ 1266 Points in Rectangle" "Codech
阅读全文
摘要:知识点 线段树 权值 树套树 二维 可持续 解决问题类型: 区间rmq即其他符合结合律的运算,支持区间更新。 想法题 1. 【二分】找第k个0:结点维护0的个数cnt[rt],然后在树上队cnt二分。 2. 【二分】找第k大(权值线段树):这个问题可以排序或 . 考虑线段树的做法,我们先将n个数离散
阅读全文
摘要:Operations on polynomials and series In this article we will cover common operations that you will probably have to do if you deal with polynomials. B
阅读全文
摘要:AtCoder 137 F 插值求系数 想法题 题意: "AtCoder 137 F" 已知:在p个点的值: 求:$f(x) = b_{p 1} x^{p 1} + b_{p 2} x^{p 2
阅读全文
摘要:Burnside's lemma / Pólya enumeration theorem Burnside's lemma Burnside's lemma was formulated and proven by Burnside in 1897, but historically it was
阅读全文
摘要:The Inclusion Exclusion Principle The inclusion exclusion principle is an important combinatorial way to compute the size of a set or the probability
阅读全文