generated from Tiphereth-A/TINplate
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
90b23c4
commit a3bf763
Showing
20 changed files
with
76 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
\begin{itemize} | ||
\item \verb|segtl_addmax_ctor|: 区间加, 区间最大值 | ||
\item \verb|segtl_addmin_ctor|: 区间加, 区间最小值 | ||
\item \verb|segtl_addsum_ctor|: 区间加, 区间和 | ||
\item \verb|segtl_setmax_ctor|: 区间赋值, 区间最大值 | ||
\item \verb|segtl_setmin_ctor|: 区间赋值, 区间最小值 | ||
\item \verb|segtl_setsum_ctor|: 区间赋值, 区间和 | ||
\end{itemize} | ||
\begin{multicols}{2} | ||
\verb|segtl_addmax_ctor|: 区间加, 区间最大值 \\ | ||
\verb|segtl_addmin_ctor|: 区间加, 区间最小值 \\ | ||
\verb|segtl_addsum_ctor|: 区间加, 区间和 \\ | ||
\verb|segtl_setmax_ctor|: 区间赋值, 区间最大值 \\ | ||
\verb|segtl_setmin_ctor|: 区间赋值, 区间最小值 \\ | ||
\verb|segtl_setsum_ctor|: 区间赋值, 区间和 | ||
\end{multicols} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
支持可持久化 | ||
|
||
\verb|add(bit, val, idx, xor_val)|: 先将当前 Trie 树包含的所有路径临时异或 \verb|xor_val|, 之后将 \verb|bit| 对应路径上所有点权均加 \verb|val|. 先将当前 Trie 树包含的所有路径临时异或 \verb|xor_val|, 之后若 \verb|idx| 不为 \(-1\) 则在所有匹配结点的 \verb|idxs| 里加入 \verb|idx|. | ||
|
||
\verb|find(bit, xor_val)|: 先将当前 Trie 树包含的所有路径临时异或 \verb|xor_val|, 之后返回 \verb|bit| 的匹配结点编号, 未找到则返回 \(0\). | ||
|
||
\verb|kth_element(k, xor_val)|: 先将当前 Trie 树包含的所有路径临时异或 \verb|xor_val|, 之后返回所有结点中第 \(k\) 小 (最小: \verb|0|; 最大: \verb|data[root].val - 1|) 的路径与编号. | ||
|
||
\verb|count_less(bit, xor_val)|: 先将当前 Trie 树包含的所有路径临时异或 \verb|xor_val|, 之后返回小于 \verb|bit| 的路径构成子树点权和. | ||
\begin{itemize} | ||
\item \verb|add(bit, val, idx, xor_val)|: 先将当前 Trie 树包含的所有路径临时异或 \verb|xor_val|, | ||
|
||
之后将 \verb|bit| 对应路径上所有点权均加 \verb|val|, 同时若 \verb|idx| 不为 \(-1\) 则在所有匹配结点的 \verb|idxs| 里加入 \verb|idx|. | ||
|
||
\item \verb|find(bit, xor_val)|: 先将当前 Trie 树包含的所有路径临时异或 \verb|xor_val|, | ||
|
||
之后返回 \verb|bit| 的匹配结点编号, 未找到则返回 \(0\). | ||
|
||
\item \verb|kth_element(k, xor_val)|: 先将当前 Trie 树包含的所有路径临时异或 \verb|xor_val|, | ||
|
||
之后返回所有结点中第 \(k\) 小 (最小: \verb|0|; 最大: \verb|data[root].val - 1|) 的路径与编号. | ||
|
||
\item \verb|count_less(bit, xor_val)|: 先将当前 Trie 树包含的所有路径临时异或 \verb|xor_val|, | ||
|
||
之后返回小于 \verb|bit| 的路径构成子树点权和. | ||
\end{itemize} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
已知 \(f(0),\dots,f(k-1)\), \(a\), \(m\), \(f(i)=0,\quad \forall i\geq k\), \(m\in\mathbb{P}\) 求 | ||
已知 \(f(0),\dots,f(k-1)\), \(a\), \(m\), \(f(i)=0,\quad \forall i\geq k\), \(m\in\mathbb{P}\), 求 \(\displaystyle \sum_{i=0}^{\infty} a^i f(i)\bmod{m}\) | ||
|
||
\[ | ||
\sum_{i=0}^{\infty} a^i f(i)\bmod{m} | ||
\] | ||
|
||
\paragraph{复杂度} | ||
|
||
\(O(k+\log m)\) | ||
\paragraph{复杂度} \(O(k+\log m)\) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
已知 \(f(0),\dots,f(k-1)\), \(a\), \(n\), \(m\), \((m\in\mathbb{P})\), 求 | ||
已知 \(f(0),\dots,f(k-1)\), \(a\), \(n\), \(m\), \((m\in\mathbb{P})\), 求 \(\displaystyle \sum_{i=0}^{n-1} a^i f(i)\bmod{m}\) | ||
|
||
\[ | ||
\sum_{i=0}^{n-1} a^i f(i)\bmod{m} | ||
\] | ||
|
||
\paragraph{复杂度} | ||
|
||
\(O(\min{n,k}+\log m)\) | ||
\paragraph{复杂度} \(O(\min{n,k}+\log m)\) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
构造一个最短的循环序列, 使其包含长度为 \(n\), 字符集大小为 \(k\) 的 \(k^n\) 个序列 | ||
|
||
de Bruijn 序列的长度为 \(k^n\), 共有 | ||
|
||
\[ | ||
\frac{\left(k!\right)^{k^{n-1}}}{k^n} | ||
\] | ||
|
||
种 | ||
de Bruijn 序列的长度为 \(k^n\), 共有 \(\dfrac{\left(k!\right)^{k^{n-1}}}{k^n}\) 种 |