08 2022 档案

摘要:题目简介 给定一个长度为 $2n-1$ 的序列 $a$,你可以随意排列 $a$ 中的元素,请求出有多少种不同的序列 $b$,满足 $b$ 的长度为 $n$。 $b_i={a_1\ldots a_{2i-1}}$ 的中位数。 $n\leq 50$。 答案对 $10^9+7$ 取模。 分析 考虑当前已有 阅读全文
posted @ 2022-08-17 09:19 AlienCollapsar 阅读(70) 评论(4) 推荐(0)
摘要:题目简介 给一个小写字符串 $s$ ,往 $s$ 里面插 $n$ 个数字得到 $t$ 。要求 $t$ 为回文串,求方案数。 分析 $\color{black}{\mbox{O}}$$\color{red}{\mbox{rzqm}}$说,这道题就是一个区间DP转有限状态自动机再优化建图后进行矩阵加速。 阅读全文
posted @ 2022-08-12 19:44 AlienCollapsar 阅读(80) 评论(0) 推荐(0)
摘要:namespace simpler{ template<class T,class Sequence=std::vector<T>,class Updater=std::plus<T>> class segtree{ protected: size_t siz_n,siz_m; Sequence s 阅读全文
posted @ 2022-08-10 14:57 AlienCollapsar 阅读(57) 评论(0) 推荐(1)

// 生成目录索引列表 // ref: http://www.cnblogs.com/wangqiguo/p/4355032.html // modified by: zzq