摘要: 单位根 引入 我们研究复数中特殊的一类数,即在复数范围内 \(x^n=1(n \in \N_+)\) 的根,它们称为单位根,方程为 \(n\) 则被称为 \(n\) 次单位根,记作 \(\omega_n\),由代数基本定理可知,\(n\) 次单位根共有 \(n\) 个,我们逆时针依次编号为 \(\o 阅读全文
posted @ 2022-08-21 12:42 little_pinkpig 阅读(67) 评论(1) 推荐(0)
摘要: \(\text{Significant Suffixes}\) 我们定义 \(\text{ssuf}(S)\) 表示 \(S\) 中可能成为最小后缀的后缀,形式化定义为 记 \(\text{suf}(S)\) 表示 \(S\) 的所有后缀; 记 \(\text{minsuf}(S)\) 表示 \(S 阅读全文
posted @ 2024-10-23 19:53 little_pinkpig 阅读(64) 评论(0) 推荐(1)
摘要: \(\text{「CF1037H」Security}\) 有关字典序可以依次考虑 \(T\) 的每一位转化为询问 \(\mathcal O(|\Sigma||T|)\) 个字符串在区间 \([l,r]\) 的存在性判断。因为可以用线段树合并维护 \(\text{SAM}\) 上每个等价类的 \(\t 阅读全文
posted @ 2024-09-06 22:16 little_pinkpig 阅读(70) 评论(0) 推荐(0)
摘要: \(\mathcal {Day}\ 0\) 下午试机,想快点回去摆,熟悉了特别难用的奇怪 \(\text{ubuntu}\) 系统和考试须知后就摆了。 \(\mathcal {Day}\ 1\) 考试先开 \(\text{T1}\) 先写了 \(O(m3^n)\) 的做法,再改成 \(O(nm2^n 阅读全文
posted @ 2024-01-27 19:54 little_pinkpig 阅读(170) 评论(0) 推荐(1)
摘要: \(\text{「ABC222H」Beautiful Binary Tree}\) \(\text{Link}\) \(\text{Describe}\) 对于一个正整数 \(n\),我们称满足以下条件的有根二叉树是一棵美丽的 \(n\) 阶二叉树。 每个节点有一个数字 \(0\) 或 \(1\), 阅读全文
posted @ 2023-11-28 17:31 little_pinkpig 阅读(61) 评论(1) 推荐(0)
摘要: \(\text{heart}\) \(\text{Solution}\) 可以记 \(f(u)\) 为从 \(u\) 出发到某个点停止的方案数,\(f(u)\) 可以 \(\mathcal O(n)\) 转移,显然复杂度为 \(\mathcal O(n^2)\). 当前我们要转移 \(u\) 子树内 阅读全文
posted @ 2023-11-14 22:13 little_pinkpig 阅读(43) 评论(1) 推荐(0)
摘要: \(\text{「GLR-R3」}\) 惊蛰 \(\text{Link}\) \(\text{Describe}\) 给定非负整数序列 \(\{a_n\}\),定义函数 \(f(x,y)\) 为 \[f(x,y)=\begin{cases} x-y,&x\ge y\\ C,&x< y \end{ca 阅读全文
posted @ 2023-11-02 22:11 little_pinkpig 阅读(76) 评论(0) 推荐(0)
摘要: \(\text{「CF715E」Complete the Permutations}\) \(\text{Link}\) \(\text{Describe}\) 给定长为 \(n\) 的且部分确定的置换 \(p,q\)。定义 \(p,q\) 距离为通过交换 \(p\) 任意两项变为 \(q\) 的最 阅读全文
posted @ 2023-10-28 23:10 little_pinkpig 阅读(47) 评论(0) 推荐(0)
摘要: \(\text{「CF1491H」Yuezheng Ling and Dynamic Tree}\) \(\text{Solution}\) 根据弹飞绵羊的思路,考虑分块维护一个 \(\text{top}(u)\) 表示 \(u\) 第一个不在当前块的祖先,设块长为 \(O(B)\),考虑如何求 \ 阅读全文
posted @ 2023-10-07 18:12 little_pinkpig 阅读(126) 评论(0) 推荐(0)
摘要: \(\text{「CF848D」Shake It!}\) \(\text{Solution}\) 我们可以发现题目中的图可以拆分为若干个递归的子结构,可以对这些子结构考虑 \(\text{DP}\),设 \(f(i,j)\) 表示考虑对一个子结构 \((s,t)\) 加入 \(i\) 个点后形成的图 阅读全文
posted @ 2023-10-06 20:27 little_pinkpig 阅读(89) 评论(0) 推荐(1)
摘要: \(\texttt{「CF1713F」Lost Array}\) \(\text{Link}\) \(\texttt{Solution}\) 考虑将前缀贡献转换为路径计数,为方便,将列编号从右向左依次编号为 \(0\sim n\)。考虑 \((0,i)\) 到 \((j,0)\) 的贡献次数其实是 阅读全文
posted @ 2023-09-20 19:44 little_pinkpig 阅读(119) 评论(0) 推荐(1)