<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>ouuan的博客</title><link>https://ouuan.github.io/</link><description>Recent content on ouuan的博客</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><lastBuildDate>Sun, 10 Oct 2021 09:33:17 +0800</lastBuildDate><atom:link href="https://ouuan.github.io/index.xml" rel="self" type="application/rss+xml"/><item><title>使用 auto-merge 解决 dependabot</title><link>https://ouuan.github.io/post/use-auto-merge-to-conquer-dependabot/</link><pubDate>Sun, 10 Oct 2021 09:33:17 +0800</pubDate><guid>https://ouuan.github.io/post/use-auto-merge-to-conquer-dependabot/</guid><description>&lt;p>用过 dependabot 的同学，尤其是使用着一些更新频繁的依赖的同学，一定都体验过被 dependabot 支配的恐惧。使用 GitHub 的 auto-merge 功能可以很好地解决这一问题。&lt;/p></description></item><item><title>TypeScript 中子类型判定的基本原则，特例，以及相关操作</title><link>https://ouuan.github.io/post/typescript-subtype-principle-exceptions-and-operations/</link><pubDate>Sun, 22 Aug 2021 12:28:25 +0800</pubDate><guid>https://ouuan.github.io/post/typescript-subtype-principle-exceptions-and-operations/</guid><description>&lt;p>类型是 TypeScript 中的基本概念，而两个类型之间是否存在子类型关系则决定了许多操作是否合法。多数类型的相关规则是非常符合直觉的，有些规则是符合逻辑而不一定符合直觉的，而少数规则则是例外。本文试图归纳一下子类型判定的基本原则，特例，以及相关操作。&lt;/p></description></item><item><title>蒙特卡洛树搜索（MCTS）学习笔记</title><link>https://ouuan.github.io/post/monte-carlo-tree-search/</link><pubDate>Wed, 18 Aug 2021 09:58:33 +0800</pubDate><guid>https://ouuan.github.io/post/monte-carlo-tree-search/</guid><description>&lt;p>蒙特卡洛树搜索（英语：Monte Carlo tree search；简称：MCTS）是一种用于某些决策过程的启发式搜索算法，最引人注目的是在游戏中的使用。一个主要例子是电脑围棋程序，它也用于其他棋盘游戏、即时电子游戏以及不确定性游戏。&lt;/p></description></item><item><title>实质条件与全称量词</title><link>https://ouuan.github.io/post/implication-and-forall/</link><pubDate>Sun, 08 Aug 2021 16:26:55 +0800</pubDate><guid>https://ouuan.github.io/post/implication-and-forall/</guid><description>&lt;p>反对论证不代表反对论点。&lt;/p>
&lt;p>但是&amp;hellip; $\neg (p \Rightarrow q) \Rightarrow \neg q$。难道反对论证就是反对论点？&lt;/p></description></item><item><title>2021.7.2 THU 大巴半日游</title><link>https://ouuan.github.io/post/2021-7-2-thu-half-day-bus-trip/</link><pubDate>Fri, 02 Jul 2021 18:20:32 +0800</pubDate><guid>https://ouuan.github.io/post/2021-7-2-thu-half-day-bus-trip/</guid><description>&lt;p>吃完午饭走到 THU 门口，等了一会儿，坐大巴去教学楼。&lt;/p></description></item><item><title>功利主义下排队问题的数学原理</title><link>https://ouuan.github.io/post/line-up-principia-mathematica-under-utilitarianism/</link><pubDate>Sun, 04 Apr 2021 00:44:54 +0800</pubDate><guid>https://ouuan.github.io/post/line-up-principia-mathematica-under-utilitarianism/</guid><description>&lt;p>本文以功利主义为指导思想，通过适当的数学建模，对一些排队过程中经常遇到的问题进行了探讨。&lt;/p></description></item><item><title>筷子</title><link>https://ouuan.github.io/post/chopsticks/</link><pubDate>Sat, 23 Jan 2021 12:42:12 +0800</pubDate><guid>https://ouuan.github.io/post/chopsticks/</guid><description>&lt;p>筷子，每二十余双由橡皮筋绑成一捆，放在“深不见底”——如果不踮起脚看的话——的箱子里，摆在食堂的窗口边；手上端着饭的学生们，排成一条长队向放着筷子的箱子走去，然后把手伸进箱内，再从一捆筷子中抽出两根。&lt;/p></description></item><item><title>遗传病概率计算中的条件概率问题</title><link>https://ouuan.github.io/post/conditional-probability-in-heredity-calculation/</link><pubDate>Sun, 10 Jan 2021 09:28:16 +0800</pubDate><guid>https://ouuan.github.io/post/conditional-probability-in-heredity-calculation/</guid><description>&lt;p>考试中的一道遗传图谱计算题为何会引发整整一周的争论？&lt;/p>
&lt;p>为何办公室中只有数学老师认为题目有问题？&lt;/p>
&lt;p>为何数学老师觉得参考答案错了却算不出正确答案？&lt;/p>
&lt;p>后发生的事能“影响”先发生的事的概率吗？&lt;/p>
&lt;p>遗传图谱计算中的“概率”意义究竟是什么？&lt;/p>
&lt;p>如果高考有这样的题，我们在考场上应该怎么做？考完了应该骂出题人吗？&lt;/p></description></item><item><title>随笔合集</title><link>https://ouuan.github.io/post/sentences/</link><pubDate>Sun, 22 Nov 2020 09:28:28 +0800</pubDate><guid>https://ouuan.github.io/post/sentences/</guid><description>&lt;p>一些不能单独成篇的随笔。&lt;/p></description></item><item><title>记一场“革命”</title><link>https://ouuan.github.io/post/a-revolution-in-the-canteen/</link><pubDate>Sat, 24 Oct 2020 21:15:26 +0800</pubDate><guid>https://ouuan.github.io/post/a-revolution-in-the-canteen/</guid><description>&lt;p>中午，在食堂，我目睹了一场“革命”。&lt;/p></description></item><item><title>～AFTER OI～</title><link>https://ouuan.github.io/post/afteroi/</link><pubDate>Wed, 19 Aug 2020 22:04:16 +0800</pubDate><guid>https://ouuan.github.io/post/afteroi/</guid><description>&lt;p>我刚听说 &amp;ldquo;AFO&amp;rdquo; 这个词是就以为它是 &amp;ldquo;AFter OI&amp;rdquo; 的缩写。我到现在也不喜欢 &amp;ldquo;Away From OI&amp;rdquo; 这个说法。&lt;/p></description></item><item><title>APIO/NOI 2020 断网记</title><link>https://ouuan.github.io/post/apio-noi-2020/</link><pubDate>Sun, 16 Aug 2020 11:44:09 +0800</pubDate><guid>https://ouuan.github.io/post/apio-noi-2020/</guid><description>&lt;p>为什么周围都是热点，而我却只有 2G（x&lt;/p></description></item><item><title>CS Academy Round #10 - Expected Tree Degrees</title><link>https://ouuan.github.io/post/csacademy-expected-tree-degrees/</link><pubDate>Sun, 26 Jul 2020 22:33:07 +0800</pubDate><guid>https://ouuan.github.io/post/csacademy-expected-tree-degrees/</guid><description>&lt;p>&lt;a href="https://csacademy.com/contest/archive/task/expected-tree-degrees/">题目链接&lt;/a>&lt;/p>
&lt;div class="admonition question">
&lt;p class="admonition-title">题目描述&lt;/p>
&lt;p>有一棵 $n$ 个点的树，由如下方式生成：&lt;/p>
&lt;p>对于每个点 $i$ ($i\ge 2$)，在 $1$ 到 $i-1$ 中等概率选择一个点作为点 $i$ 的父亲。&lt;/p>
&lt;p>求每个点的度数的平方和的期望，要求绝对误差不超过 $10^{-6}$，$n\le 10^6$。&lt;/p>
&lt;/div></description></item><item><title>Firefox 的 Tree Style Tab 和 Duplicate Tabs Closer 插件</title><link>https://ouuan.github.io/post/firefox-tree-style-tab-and-duplicate-tabs-closer/</link><pubDate>Thu, 09 Jul 2020 13:00:46 +0800</pubDate><guid>https://ouuan.github.io/post/firefox-tree-style-tab-and-duplicate-tabs-closer/</guid><description>&lt;p>你在使用浏览器时是否有这样的烦恼？&lt;/p>
&lt;ul>
&lt;li>到底开多少个标签页？
&lt;ol>
&lt;li>开很多浏览器标签页 ⇒ 找不到标签页在哪，切换麻烦。&lt;/li>
&lt;li>开很少浏览器标签页 ⇒ 需要频繁地打开、关闭标签页。&lt;/li>
&lt;/ol>
&lt;/li>
&lt;li>标签页之间层次混乱，不同类别的标签页混在一起。&lt;/li>
&lt;li>从不同的地方点链接打开同一个网址，关了一个忘记关另一个。&lt;/li>
&lt;li>……&lt;/li>
&lt;/ul>
&lt;p>使用 Firefox 的 Tree Style Tab 和 Duplicate Tabs Closer 插件，就可以解决上述烦恼。&lt;/p></description></item><item><title>C++ lambda 使用引用捕获局部变量的陷阱</title><link>https://ouuan.github.io/post/lambda-capture-local-variable-by-reference/</link><pubDate>Wed, 08 Jul 2020 14:08:38 +0800</pubDate><guid>https://ouuan.github.io/post/lambda-capture-local-variable-by-reference/</guid><description>&lt;p>C++ NB $\times$&lt;/p>
&lt;p>C++ UB $\sqrt{}$&lt;/p></description></item><item><title>2020省选自闭记</title><link>https://ouuan.github.io/post/hbsx2020/</link><pubDate>Sat, 20 Jun 2020 14:46:43 +0800</pubDate><guid>https://ouuan.github.io/post/hbsx2020/</guid><description>&lt;p>&lt;code>&amp;lt;area/&amp;gt;&lt;/code>
&lt;code>&amp;lt;base/&amp;gt;&lt;/code>
&lt;code>&amp;lt;br/&amp;gt;&lt;/code>
&lt;code>&amp;lt;col/&amp;gt;&lt;/code>
&lt;code>&amp;lt;command/&amp;gt;&lt;/code>
&lt;code>&amp;lt;embed/&amp;gt;&lt;/code>
&lt;code>&amp;lt;hr/&amp;gt;&lt;/code>
&lt;code>&amp;lt;img/&amp;gt;&lt;/code>
&lt;code>&amp;lt;input/&amp;gt;&lt;/code>
&lt;code>&amp;lt;keygen/&amp;gt;&lt;/code>
&lt;code>&amp;lt;link/&amp;gt;&lt;/code>
&lt;code>&amp;lt;menuitem/&amp;gt;&lt;/code>
&lt;code>&amp;lt;meta/&amp;gt;&lt;/code>
&lt;code>&amp;lt;param/&amp;gt;&lt;/code>
&lt;code>&amp;lt;source/&amp;gt;&lt;/code>
&lt;code>&amp;lt;track/&amp;gt;&lt;/code>
&lt;code>&amp;lt;wbr/&amp;gt;&lt;/code>&lt;/p></description></item><item><title>带修改的树上 DP 问题（动态 DP）</title><link>https://ouuan.github.io/post/tree-dp-with-modification/</link><pubDate>Thu, 07 May 2020 20:58:54 +0800</pubDate><guid>https://ouuan.github.io/post/tree-dp-with-modification/</guid><description>&lt;p>“动态 DP”通过树链剖分将带修改的树上 DP 问题拆分为规模更小的序列上的半群合并问题和树上 DP 问题，从而可以快速地支持修改。&lt;/p></description></item><item><title>CF484E Sign on Fence</title><link>https://ouuan.github.io/post/cf484e/</link><pubDate>Mon, 20 Apr 2020 23:05:37 +0800</pubDate><guid>https://ouuan.github.io/post/cf484e/</guid><description>&lt;p>&lt;a href="https://codeforces.com/contest/484/problem/E">题目链接&lt;/a>&lt;/p>
&lt;div class="admonition question">
&lt;p class="admonition-title">题目描述&lt;/p>
&lt;p>给你一个数列 $a_{1..n}$，进行 $m$ 次询问，每次询问给出一个区间 $[l, r]$ 及参数 $w$，询问 $\max_{i = l}^{r-w+1}\{\min_{j=i}^{i+w-1}\{a_j\}\}$。&lt;/p>
&lt;p>数列长度和询问次数 $10^5$。&lt;/p>
&lt;/div></description></item><item><title>「SDOI2017」树点涂色</title><link>https://ouuan.github.io/post/sdoi2017-%E6%A0%91%E7%82%B9%E6%B6%82%E8%89%B2/</link><pubDate>Fri, 17 Apr 2020 12:38:34 +0800</pubDate><guid>https://ouuan.github.io/post/sdoi2017-%E6%A0%91%E7%82%B9%E6%B6%82%E8%89%B2/</guid><description>&lt;p>&lt;a href="https://loj.ac/problem/2001">LOJ&lt;/a>&lt;/p>
&lt;div class="admonition question">
&lt;p class="admonition-title">题目描述&lt;/p>
&lt;p>给你一棵有根树，一开始每个点都有不同的颜色。有三种操作：&lt;/p>
&lt;ol>
&lt;li>给定 $x$，将 $x$ 到根的路径修改为一种当前树上没有出现的颜色。&lt;/li>
&lt;li>给定 $x$ 和 $y$，询问 $x$ 到 $y$ 的路径上不同颜色的数量。&lt;/li>
&lt;li>给定 $x$，令一个点的权值为它到根路径上不同颜色的数量，求子树 $x$ 中的最大权值。&lt;/li>
&lt;/ol>
&lt;p>点数和操作数 $10^5$。&lt;/p>
&lt;/div></description></item><item><title>使用 GitHub Project 创建一份 To Do List</title><link>https://ouuan.github.io/post/use-github-project-to-create-a-to-do-list/</link><pubDate>Sat, 14 Mar 2020 13:14:15 +0800</pubDate><guid>https://ouuan.github.io/post/use-github-project-to-create-a-to-do-list/</guid><description>&lt;p>大家知道我整天在 GitHub 上&lt;del>根本&lt;/del>几乎不做题，那为什么不利用 GitHub 来督促自己做题呢？&lt;/p>
&lt;p>GitHub 的 Projects 功能正好适合这么做。&lt;/p>
&lt;p>&lt;a href="https://github.com/users/ouuan/projects/2">我的 Project&lt;/a>&lt;/p></description></item><item><title>「HNOI2010」城市建设（线段树分治，LCT/Kruskal）</title><link>https://ouuan.github.io/post/hnoi2010-%E5%9F%8E%E5%B8%82%E5%BB%BA%E8%AE%BE/</link><pubDate>Wed, 26 Feb 2020 23:12:33 +0800</pubDate><guid>https://ouuan.github.io/post/hnoi2010-%E5%9F%8E%E5%B8%82%E5%BB%BA%E8%AE%BE/</guid><description>&lt;p>&lt;a href="https://www.luogu.com.cn/problem/P3206">洛谷&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://www.lydsy.com/JudgeOnline/problem.php?id=2001">BZOJ&lt;/a>&lt;/p>
&lt;div class="admonition question">
&lt;p class="admonition-title">题目描述&lt;/p>
&lt;p>给你一张边带权的无向连通图，多次修改，每次修改一条边的边权，每次修改完后求最小生成树的边权之和。&lt;/p>
&lt;p>点数 $2\cdot 10^4$, 边数和修改数 $5\cdot 10^4$，时限 3s。&lt;/p>
&lt;/div></description></item><item><title>CF603E Pastoral Oddities（结论，LCT/分治+并查集）</title><link>https://ouuan.github.io/post/cf603e/</link><pubDate>Tue, 18 Feb 2020 11:45:02 +0800</pubDate><guid>https://ouuan.github.io/post/cf603e/</guid><description>&lt;p>&lt;a href="https://codeforces.com/contest/603/problem/E">题目链接&lt;/a>&lt;/p>
&lt;div class="admonition question">
&lt;p class="admonition-title">题意简述&lt;/p>
&lt;p>给你一张边带权且边从 $1$ 到 $m$ 编号的无向图 $G$，称一张图 $H$ 是“好的”，当且仅当存在一个 $H$ 的生成子图 $F$ 使得 $F$ 中每个点的度数都是奇数。现在，你需要回答 $m$ 个问题，第 $i$ 个问题是：求最小的 $x$，使得仅保留 $G$ 中编号不超过 $i$ 且边权不超过 $x$ 的边时，得到的生成子图是“好的”，或者指出不存在这样的 $x$。&lt;/p>
&lt;p>$2\le n\le 10^5$, $1\le m\le 3\cdot 10^5$, TL 4s。&lt;/p>
&lt;/div></description></item><item><title>整体二分学习笔记</title><link>https://ouuan.github.io/post/parallel-binary-search/</link><pubDate>Fri, 14 Feb 2020 14:50:32 +0800</pubDate><guid>https://ouuan.github.io/post/parallel-binary-search/</guid><description>&lt;p>整体二分是一种离线算法，可以将一个修改同时作用于多个询问，从而减少不必要的开销，将二分答案从单次询问扩展到多次询问。&lt;/p>
&lt;p>在一些题目中，相比与其它解法，整体二分可以避免复杂的数据结构，降低代码难度与空间复杂度。&lt;/p></description></item><item><title>搜索</title><link>https://ouuan.github.io/search/</link><pubDate>Fri, 07 Feb 2020 17:43:21 +0800</pubDate><guid>https://ouuan.github.io/search/</guid><description/></item><item><title>从 Hexo 到 Hugo</title><link>https://ouuan.github.io/post/from-hexo-to-hugo/</link><pubDate>Thu, 06 Feb 2020 23:07:17 +0800</pubDate><guid>https://ouuan.github.io/post/from-hexo-to-hugo/</guid><description>&lt;p>该博客的前身是自 2018 年 12 月搭建的 hexo 博客，于 2020 年 2 月搬迁至 hugo。&lt;/p></description></item><item><title>一些链接</title><link>https://ouuan.github.io/post/links/</link><pubDate>Thu, 06 Feb 2020 22:53:11 +0800</pubDate><guid>https://ouuan.github.io/post/links/</guid><description>&lt;p>友链以及一些不知道为什么我以前放在了博客而不是收藏夹的网站。&lt;/p></description></item><item><title>「HNOI2016」最小公倍数（回滚莫队，并查集）</title><link>https://ouuan.github.io/post/hnoi2016%E6%9C%80%E5%B0%8F%E5%85%AC%E5%80%8D%E6%95%B0%E5%9B%9E%E6%BB%9A%E8%8E%AB%E9%98%9F%E5%B9%B6%E6%9F%A5%E9%9B%86/</link><pubDate>Wed, 08 Jan 2020 14:49:06 +0800</pubDate><guid>https://ouuan.github.io/post/hnoi2016%E6%9C%80%E5%B0%8F%E5%85%AC%E5%80%8D%E6%95%B0%E5%9B%9E%E6%BB%9A%E8%8E%AB%E9%98%9F%E5%B9%B6%E6%9F%A5%E9%9B%86/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://loj.ac/problem/2048">LOJ&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://www.luogu.com.cn/problem/P3247">洛谷&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>给你一张带边权的无向图，边权都形如 $2^a3^b$ ，若干询问，每次问是否存在 $u$ 到 $v$ 且边权的最小公倍数为 $2^a3^b$ 的途径（可以不是简单路径）。&lt;/p>
&lt;p>点数 $5\cdot 10^4$，边数 $10^5$，询问数 $5\cdot 10^4$ 。&lt;/p></description></item><item><title>「NOI2018」你的名字（SAM，线段树合并）</title><link>https://ouuan.github.io/post/noi2018%E4%BD%A0%E7%9A%84%E5%90%8D%E5%AD%97sam%E7%BA%BF%E6%AE%B5%E6%A0%91%E5%90%88%E5%B9%B6/</link><pubDate>Tue, 07 Jan 2020 18:33:42 +0800</pubDate><guid>https://ouuan.github.io/post/noi2018%E4%BD%A0%E7%9A%84%E5%90%8D%E5%AD%97sam%E7%BA%BF%E6%AE%B5%E6%A0%91%E5%90%88%E5%B9%B6/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://uoj.ac/problem/395">UOJ&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://loj.ac/problem/2720">LOJ&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://www.luogu.com.cn/problem/P4770">洛谷&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>给你一个字符串 $S$，有 $q$ 次询问，每次给你询问串 $T$ 以及左右端点 $l$, $r$，询问 $T$ 有多少个 &lt;strong>本质不同&lt;/strong> 的子串 &lt;strong>不是&lt;/strong> $S[l..r]$ 的子串。&lt;/p>
&lt;p>$|S|\le 5\cdot 10^5$, $\sum|T|\le 10^6$, $q\le 10^5$ 。&lt;/p></description></item><item><title>THUWC2019 第二轮冬眠</title><link>https://ouuan.github.io/post/thuwc2019-%E7%AC%AC%E4%BA%8C%E8%BD%AE%E5%86%AC%E7%9C%A0/</link><pubDate>Fri, 20 Dec 2019 20:37:57 +0800</pubDate><guid>https://ouuan.github.io/post/thuwc2019-%E7%AC%AC%E4%BA%8C%E8%BD%AE%E5%86%AC%E7%9C%A0/</guid><description>&lt;p>&lt;del>非常荣幸能够参加这场跨度 300+ 天的比赛。&lt;/del>&lt;/p>
&lt;p>&lt;del>上接 &lt;a href="https://ouuan.github.io/2019THUWC-WC%E5%86%AC%E7%9C%A0%E8%AE%B0">2019THUWC/WC冬眠记&lt;/a> 。&lt;/del>&lt;/p></description></item><item><title>CF786C Till I Collapse（根号分治，二分答案 / 主席树，调和级数）</title><link>https://ouuan.github.io/post/cf786c-till-i-collapse%E6%A0%B9%E5%8F%B7%E5%88%86%E6%B2%BB%E4%BA%8C%E5%88%86%E7%AD%94%E6%A1%88-%E4%B8%BB%E5%B8%AD%E6%A0%91%E8%B0%83%E5%92%8C%E7%BA%A7%E6%95%B0/</link><pubDate>Fri, 06 Dec 2019 19:24:14 +0800</pubDate><guid>https://ouuan.github.io/post/cf786c-till-i-collapse%E6%A0%B9%E5%8F%B7%E5%88%86%E6%B2%BB%E4%BA%8C%E5%88%86%E7%AD%94%E6%A1%88-%E4%B8%BB%E5%B8%AD%E6%A0%91%E8%B0%83%E5%92%8C%E7%BA%A7%E6%95%B0/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://codeforces.com/contest/786/problem/C">CF&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>给你一个长为 $n$ 的数列，对于 $1\le k\le n$ 的所有整数 $k$，求出这个问题的答案：将数列划分成若干连续段，每段内最多有 $k$ 个 &lt;strong>不同&lt;/strong> 的数，至少要划分成几段？&lt;/p>
&lt;p>$n\le 10^5$ 。&lt;/p></description></item><item><title>CF594D REQ（数颜色，莫队，树状数组，数论）</title><link>https://ouuan.github.io/post/cf594d-req%E6%95%B0%E9%A2%9C%E8%89%B2%E8%8E%AB%E9%98%9F%E6%A0%91%E7%8A%B6%E6%95%B0%E7%BB%84%E6%95%B0%E8%AE%BA/</link><pubDate>Thu, 05 Dec 2019 16:41:23 +0800</pubDate><guid>https://ouuan.github.io/post/cf594d-req%E6%95%B0%E9%A2%9C%E8%89%B2%E8%8E%AB%E9%98%9F%E6%A0%91%E7%8A%B6%E6%95%B0%E7%BB%84%E6%95%B0%E8%AE%BA/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://codeforces.com/contest/594/problem/D">CF&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>给你一个正整数序列，多次询问给定区间内每个数之积的欧拉函数 ($\varphi$)，对 $10^9+7$ 取模。&lt;/p>
&lt;p>数列长度、询问个数不超过 $2\cdot 10^5$，数的大小不超过 $10^6$ 。&lt;/p></description></item><item><title>CF455D Serega and Fun（分块 / 平衡树）</title><link>https://ouuan.github.io/post/cf455d-serega-and-fun%E5%88%86%E5%9D%97-%E5%B9%B3%E8%A1%A1%E6%A0%91/</link><pubDate>Wed, 04 Dec 2019 15:20:52 +0800</pubDate><guid>https://ouuan.github.io/post/cf455d-serega-and-fun%E5%88%86%E5%9D%97-%E5%B9%B3%E8%A1%A1%E6%A0%91/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://codeforces.com/contest/455/problem/D">CF&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>给你一个序列，在线地支持两个操作：&lt;/p>
&lt;ol>
&lt;li>
&lt;p>将一个区间循环移位。&lt;/p>
&lt;/li>
&lt;li>
&lt;p>查询一个区间中某个数出现的次数。&lt;/p>
&lt;/li>
&lt;/ol>
&lt;p>序列长度、查询个数都不超过 $10^5$，时限 $\texttt{4s}$ 。&lt;/p></description></item><item><title>CF901C Bipartite Segments（二分图）</title><link>https://ouuan.github.io/post/cf901c-bipartite-segments%E4%BA%8C%E5%88%86%E5%9B%BE/</link><pubDate>Fri, 29 Nov 2019 20:54:11 +0800</pubDate><guid>https://ouuan.github.io/post/cf901c-bipartite-segments%E4%BA%8C%E5%88%86%E5%9B%BE/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://codeforces.com/contest/901/problem/D">CF&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>定义一个“偶环”为边数为偶数的回路（回路又被称作“边简单环”，即不经过重复边且首尾点相同的途径）。&lt;/p>
&lt;p>给你一张不含“偶环”的无向图。称一个区间是“好的”，当且仅当编号在这个区间中的点的导出子图是一张二分图。&lt;/p>
&lt;p>多组询问，每次询问一个给定区间有多少个子区间是“好的”。&lt;/p>
&lt;p>点数、边数、询问数均不超过 $3\cdot 10^5$ 。&lt;/p></description></item><item><title>CF1260F Colored Tree（点分治，差分，基数排序）</title><link>https://ouuan.github.io/post/cf1260f-colored-tree%E7%82%B9%E5%88%86%E6%B2%BB%E5%B7%AE%E5%88%86%E5%9F%BA%E6%95%B0%E6%8E%92%E5%BA%8F/</link><pubDate>Fri, 29 Nov 2019 14:00:53 +0800</pubDate><guid>https://ouuan.github.io/post/cf1260f-colored-tree%E7%82%B9%E5%88%86%E6%B2%BB%E5%B7%AE%E5%88%86%E5%9F%BA%E6%95%B0%E6%8E%92%E5%BA%8F/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://codeforces.com/contest/1260/problem/F">CF&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>给你一棵树，每个点的颜色为一个区间内的整数，一种染色方案的权值是所有同色无序点对的距离之和，求所有不同染色方案的权值之和。&lt;/p>
&lt;p>点数、颜色数均不超过 $10^5$ 。&lt;/p></description></item><item><title>UOJ 无限 waiting 的解决方法</title><link>https://ouuan.github.io/post/uoj-%E6%97%A0%E9%99%90-waiting-%E7%9A%84%E8%A7%A3%E5%86%B3%E6%96%B9%E6%B3%95/</link><pubDate>Thu, 28 Nov 2019 20:10:41 +0800</pubDate><guid>https://ouuan.github.io/post/uoj-%E6%97%A0%E9%99%90-waiting-%E7%9A%84%E8%A7%A3%E5%86%B3%E6%96%B9%E6%B3%95/</guid><description>&lt;p>本文讲的是自己搭建的 UOJ 如何解决无限 waiting，而不是 &lt;a href="https://uoj.ac">https://uoj.ac&lt;/a> 如何解决无限 waiting（后者大概要联系 vfk..反正我是没遇到过）。&lt;/p></description></item><item><title>「NOI2014」购票（斜率优化，点分治）</title><link>https://ouuan.github.io/post/noi2014%E8%B4%AD%E7%A5%A8%E6%96%9C%E7%8E%87%E4%BC%98%E5%8C%96%E7%82%B9%E5%88%86%E6%B2%BB/</link><pubDate>Mon, 25 Nov 2019 16:07:04 +0800</pubDate><guid>https://ouuan.github.io/post/noi2014%E8%B4%AD%E7%A5%A8%E6%96%9C%E7%8E%87%E4%BC%98%E5%8C%96%E7%82%B9%E5%88%86%E6%B2%BB/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://uoj.ac/problem/7">UOJ&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://www.luogu.com.cn/problem/P2305">洛谷&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>给你一棵树，$i$ 号点有 $p_i$、$q_i$ 和 $l_i$ 三个属性，每条边有给定的长度。&lt;/p>
&lt;p>从一个点出发可以到达其祖先中与其距离不超过 $l_i$ 的点，费用为 $p_i\cdot dis+q_i$，求每个点到根的最小费用。&lt;/p>
&lt;p>点数不超过 $2\cdot 10^5$ 。&lt;/p></description></item><item><title>2019，以及毕业之前</title><link>https://ouuan.github.io/post/2019%E4%BB%A5%E5%8F%8A%E6%AF%95%E4%B8%9A%E4%B9%8B%E5%89%8D/</link><pubDate>Sat, 23 Nov 2019 19:28:56 +0800</pubDate><guid>https://ouuan.github.io/post/2019%E4%BB%A5%E5%8F%8A%E6%AF%95%E4%B8%9A%E4%B9%8B%E5%89%8D/</guid><description>&lt;p>怀着伤感的心情写下这段文字，然后开始一段新的征程。&lt;/p></description></item><item><title>悬崖边的踟蹰 —— CSP-S 2019</title><link>https://ouuan.github.io/post/%E6%82%AC%E5%B4%96%E8%BE%B9%E7%9A%84%E8%B8%9F%E8%B9%B0-csp-s-2019/</link><pubDate>Mon, 18 Nov 2019 18:15:31 +0800</pubDate><guid>https://ouuan.github.io/post/%E6%82%AC%E5%B4%96%E8%BE%B9%E7%9A%84%E8%B8%9F%E8%B9%B0-csp-s-2019/</guid><description>&lt;p>标题来自 &lt;em>三月のライオン Chapter.64 銀の羽根&lt;/em> ：&lt;/p>
&lt;blockquote>
&lt;p>答案只在漆黑的水底。&lt;/p>
&lt;p>越是前进，下一个答案就只能在更深的地方找到。&lt;/p>
&lt;p>以前越是潜入，就能获得答案。&lt;/p>
&lt;p>比起恐怖，欲望更胜一筹。&lt;/p>
&lt;p>但是成为职业棋手 6 年后，如今变得完全不能前进。&lt;/p>
&lt;p>即便带着要撕碎全身的想法去潜入，但是却空手而回，已经是很常见的事了。&lt;/p>
&lt;p>比起 「也许能找到」，「反正又不一定能找到」这个念头胜利的时候，就只能进行有限的努力了。&lt;/p>
&lt;p>但是，桐山和二海堂无视了那样的我。&lt;/p>
&lt;p>理所当然一样无论多少次都跳入其中。根本就不正常。&lt;/p>
&lt;p>他们即便屡次空手而归，也会制定对策继续挑战。&lt;/p>
&lt;p>丝毫不介意痛苦，无论多少次都投身其中。&lt;/p>
&lt;p>只留下，被恐惧压倒的我。&lt;/p>
&lt;/blockquote></description></item><item><title>基于 Capacity Scaling 的弱多项式复杂度最小费用流算法</title><link>https://ouuan.github.io/post/%E5%9F%BA%E4%BA%8E-capacity-scaling-%E7%9A%84%E5%BC%B1%E5%A4%9A%E9%A1%B9%E5%BC%8F%E5%A4%8D%E6%9D%82%E5%BA%A6%E6%9C%80%E5%B0%8F%E8%B4%B9%E7%94%A8%E6%B5%81%E7%AE%97%E6%B3%95/</link><pubDate>Sat, 26 Oct 2019 19:50:25 +0800</pubDate><guid>https://ouuan.github.io/post/%E5%9F%BA%E4%BA%8E-capacity-scaling-%E7%9A%84%E5%BC%B1%E5%A4%9A%E9%A1%B9%E5%BC%8F%E5%A4%8D%E6%9D%82%E5%BA%A6%E6%9C%80%E5%B0%8F%E8%B4%B9%E7%94%A8%E6%B5%81%E7%AE%97%E6%B3%95/</guid><description>&lt;p>大多数人所使用的费用流算法，即每次求出残量网络中 $s$ 到 $t$ 关于费用的最短路进行增广（将 Dinic 最大流算法中的 BFS 改为 SPFA），是伪多项式复杂度的，最坏情况下复杂度为 $O(nmf)$，其中 $f$ 为最大流。已知有一种在点数为 $n$，边数为 $O(n^2)$，值域为 $O(2^{n/2})$ 时将其用时卡成关于 $n$ 的指数级复杂度的构造方法。&lt;/p>
&lt;p>本文将介绍一种复杂度为进行 $O(m\log U)$ 次（$U$ 表示边的最大容量）无负权边单源最短路（使用 &lt;code>priority_queue&lt;/code> 实现 Dijkstra 算法，总复杂度即为 $O(m^2\log U\log m)$）的弱多项式复杂度算法。&lt;/p>
&lt;p>其实这个算法并不是很复杂（只是相关资料比较少，会对学习造成一定困难，这也是我写这篇博客的原因），最小费用最大流的模板也只需要 $2.5KB$，并不比常见的伪多项式复杂度算法长很多。&lt;/p></description></item><item><title>CF3D Least Cost Bracket Sequence（贪心）</title><link>https://ouuan.github.io/post/cf3d-least-cost-bracket-sequence%E8%B4%AA%E5%BF%83/</link><pubDate>Wed, 16 Oct 2019 21:50:44 +0800</pubDate><guid>https://ouuan.github.io/post/cf3d-least-cost-bracket-sequence%E8%B4%AA%E5%BF%83/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://codeforces.com/contest/3/problem/D">CF&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>有一个长为 $n$ 的括号序列，其中一些位置是问号，每个问号替换成左括号或替换成右括号各有给定的代价，判断是否能够构造出一个合法的括号序列，如果可以，求出最小代价。&lt;/p>
&lt;p>$n\le 5\cdot 10^4$（实际上可以大很多）。&lt;/p></description></item><item><title>CF512C Fox And Dinner（二分图，最大流）</title><link>https://ouuan.github.io/post/cf512c-fox-and-dinner%E4%BA%8C%E5%88%86%E5%9B%BE%E6%9C%80%E5%A4%A7%E6%B5%81/</link><pubDate>Tue, 15 Oct 2019 19:50:54 +0800</pubDate><guid>https://ouuan.github.io/post/cf512c-fox-and-dinner%E4%BA%8C%E5%88%86%E5%9B%BE%E6%9C%80%E5%A4%A7%E6%B5%81/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://codeforces.com/contest/512/problem/C">CF&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>给你 $n$ 个整数，需要将它们分成任意个至少包含 $3$ 个数的环，使得每相邻两个数加起来是一个质数。&lt;/p>
&lt;p>判断是否有解，若有解输出任意一组解。&lt;/p>
&lt;p>$3\le n\le 200$, 数的范围是 $[2,10^4]$。&lt;/p></description></item><item><title>CF508D Tanya and Password（欧拉路径）</title><link>https://ouuan.github.io/post/cf508d-tanya-and-password%E6%AC%A7%E6%8B%89%E8%B7%AF%E5%BE%84/</link><pubDate>Tue, 15 Oct 2019 15:01:00 +0800</pubDate><guid>https://ouuan.github.io/post/cf508d-tanya-and-password%E6%AC%A7%E6%8B%89%E8%B7%AF%E5%BE%84/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://codeforces.com/contest/508/problem/D">CF&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>有一个字符串 $S[1..n+2]$，告诉你 $\forall 1\le i\le n, S[i..i+2]$（所有长为 $3$ 的子串），求任意一个满足条件的 $S$。&lt;/p>
&lt;p>$1\le n\le 2\cdot 10^5$，字符集为大小写字母 + 数字。&lt;/p></description></item><item><title>gym102268D Dates（贪心，二分图匹配，线段树）</title><link>https://ouuan.github.io/post/gym102268d-dates%E8%B4%AA%E5%BF%83%E4%BA%8C%E5%88%86%E5%9B%BE%E5%8C%B9%E9%85%8D%E7%BA%BF%E6%AE%B5%E6%A0%91/</link><pubDate>Fri, 11 Oct 2019 11:30:32 +0800</pubDate><guid>https://ouuan.github.io/post/gym102268d-dates%E8%B4%AA%E5%BF%83%E4%BA%8C%E5%88%86%E5%9B%BE%E5%8C%B9%E9%85%8D%E7%BA%BF%E6%AE%B5%E6%A0%91/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://codeforces.com/gym/102268/problem/D">CF&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>给你一张二分图：左边 $t$ 个位置，第 $i$ 个位置上有 $a_i$ 个点；右边 $n$ 个带权的点，第 $i$ 个点与位置在 $[l_i, r_i]$ 之间的所有左边的点有连边；匹配权值为匹配中右边点的权值之和；求最大权匹配。&lt;/p>
&lt;p>$1\le n,t\le 3\cdot 10^5$，保证 $l_i\le l_{i+1}$, $r_i\le r_{i+1}$。&lt;/p></description></item><item><title>CF878E Numbers on the blackboard（贪心，并查集）</title><link>https://ouuan.github.io/post/cf878e-numbers-on-the-blackboard%E8%B4%AA%E5%BF%83%E5%B9%B6%E6%9F%A5%E9%9B%86/</link><pubDate>Tue, 08 Oct 2019 20:49:18 +0800</pubDate><guid>https://ouuan.github.io/post/cf878e-numbers-on-the-blackboard%E8%B4%AA%E5%BF%83%E5%B9%B6%E6%9F%A5%E9%9B%86/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://codeforces.com/contest/878/problem/E">CF&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>对于一个数列，每次操作可以将相邻的两个数 $x$ 和 $y$ 合并成一个数 $x+2y$，定义一个数列的权值为进行操作直至只剩一个数能得到的最大值。&lt;/p>
&lt;p>多组询问，每次给定一个区间，求这个区间的权值。&lt;/p>
&lt;p>数列值域 $-10^9\sim10^9$，数列长度和询问个数不超过 $10^5$。&lt;/p></description></item><item><title>UOJ 自动备份</title><link>https://ouuan.github.io/post/uoj-%E8%87%AA%E5%8A%A8%E5%A4%87%E4%BB%BD/</link><pubDate>Fri, 27 Sep 2019 12:01:05 +0800</pubDate><guid>https://ouuan.github.io/post/uoj-%E8%87%AA%E5%8A%A8%E5%A4%87%E4%BB%BD/</guid><description>&lt;p>作为一个刚刚上线两周就回滚了无数次数据的 OJ，备份自然是很重要的~&lt;/p></description></item><item><title>Hinata Online Judge 的搭建</title><link>https://ouuan.github.io/post/hinata-online-judge-%E7%9A%84%E6%90%AD%E5%BB%BA/</link><pubDate>Sat, 21 Sep 2019 21:58:04 +0800</pubDate><guid>https://ouuan.github.io/post/hinata-online-judge-%E7%9A%84%E6%90%AD%E5%BB%BA/</guid><description>&lt;p>程序员就是代码重用的艺术家（&lt;/p></description></item><item><title>BJOI2019 删数（贪心，线段树）</title><link>https://ouuan.github.io/post/bjoi2019-%E5%88%A0%E6%95%B0%E8%B4%AA%E5%BF%83%E7%BA%BF%E6%AE%B5%E6%A0%91/</link><pubDate>Mon, 16 Sep 2019 11:11:10 +0800</pubDate><guid>https://ouuan.github.io/post/bjoi2019-%E5%88%A0%E6%95%B0%E8%B4%AA%E5%BF%83%E7%BA%BF%E6%AE%B5%E6%A0%91/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://www.luogu.org/problem/P5324">洛谷&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://loj.ac/problem/3094">LOJ&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://www.lydsy.com/JudgeOnline/problem.php?id=5528">BZOJ&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>一个数列是“可删除的”，当且仅当可以通过这种操作将其清空：将数列中等于这个数列长度的数删去。&lt;/p>
&lt;p>如，$[1, 2, 4, 4]$ 是“可删除的”，第一次操作删成 $[1, 2]$，第二次操作删成 $[1]$，第三次操作清空。&lt;/p>
&lt;p>定义一个数列的权值为至少需要进行的单点修改数目，使得这个数列变成“可删除的”。&lt;/p>
&lt;p>现在给你一个数列 $a_{1..n}$，以及 $m$ 次修改操作，你需要在每次修改后回答这个数列的权值。&lt;/p>
&lt;p>修改操作有三种：&lt;/p>
&lt;ol>
&lt;li>单点修改。&lt;/li>
&lt;li>全局加一。&lt;/li>
&lt;li>全局减一。&lt;/li>
&lt;/ol>
&lt;p>$1\le n,m\le 150000$，数列初始值以及单点修改成的值在 $[1,n]$ 内，但全局修改可能使数列中的元素超过这个范围。&lt;/p></description></item><item><title>CF1209F Koala and Notebook（BFS，最短路）</title><link>https://ouuan.github.io/post/cf1209f-koala-and-notebookbfs%E6%9C%80%E7%9F%AD%E8%B7%AF/</link><pubDate>Mon, 16 Sep 2019 08:58:32 +0800</pubDate><guid>https://ouuan.github.io/post/cf1209f-koala-and-notebookbfs%E6%9C%80%E7%9F%AD%E8%B7%AF/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="http://codeforces.com/contest/1209/problem/F">CF&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>给你一张 $n$ 个点 $m$ 条边的无向连通图，一条路径的权值是路径上的边的编号（十进制）顺次连接而成的数字。求 $1$ 到每个点的最短路，&lt;strong>输出&lt;/strong> 对 $10^9+7$ 取模。&lt;/p>
&lt;p>$2\le n\le10^5$, $n-1\le m\le10^5$。&lt;/p></description></item><item><title>CF516D Drazil and Morning Exercise（up and down，并查集）</title><link>https://ouuan.github.io/post/cf516d-drazil-and-morning-exerciseup-and-down%E5%B9%B6%E6%9F%A5%E9%9B%86/</link><pubDate>Tue, 10 Sep 2019 13:37:12 +0800</pubDate><guid>https://ouuan.github.io/post/cf516d-drazil-and-morning-exerciseup-and-down%E5%B9%B6%E6%9F%A5%E9%9B%86/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="http://codeforces.com/contest/516/problem/D">CF&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://www.luogu.org/problem/CF516D">洛谷&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>给定一棵 $n$ 个点带边权的树，定义 $d(u)$ 为树上离它最远的点到它的距离，$q$ 次询问，每次询问给定 $l$，求一个最大的树上连通块 $V'$ 的大小，满足 $\forall u, v\in V'$，$|d(u)-d(v)|\le l$。&lt;/p>
&lt;p>$1\le n\le 10^5$, $1\le q\le 50$。&lt;/p></description></item><item><title>LOJ6519 魔力环（Burnside引理，容斥原理）</title><link>https://ouuan.github.io/post/loj6519-%E9%AD%94%E5%8A%9B%E7%8E%AFburnside%E5%BC%95%E7%90%86%E5%AE%B9%E6%96%A5%E5%8E%9F%E7%90%86/</link><pubDate>Thu, 05 Sep 2019 10:45:59 +0800</pubDate><guid>https://ouuan.github.io/post/loj6519-%E9%AD%94%E5%8A%9B%E7%8E%AFburnside%E5%BC%95%E7%90%86%E5%AE%B9%E6%96%A5%E5%8E%9F%E7%90%86/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://loj.ac/problem/6519">LOJ&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://www.luogu.org/problem/P4916">洛谷&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>你需要给 $n$ 颗珠子的项链染 $m$ 颗黑色，$n-m$ 颗白色，不能有连续的一串黑色珠子长度超过 $k$，求旋转同构下本质不同的染色方案数。&lt;/p>
&lt;p>$1\le m,k\le n\le10^5$&lt;/p></description></item><item><title>LOJ6077 逆序对（生成函数，计数dp）</title><link>https://ouuan.github.io/post/loj6077-%E9%80%86%E5%BA%8F%E5%AF%B9%E7%94%9F%E6%88%90%E5%87%BD%E6%95%B0%E8%AE%A1%E6%95%B0dp/</link><pubDate>Wed, 04 Sep 2019 09:22:32 +0800</pubDate><guid>https://ouuan.github.io/post/loj6077-%E9%80%86%E5%BA%8F%E5%AF%B9%E7%94%9F%E6%88%90%E5%87%BD%E6%95%B0%E8%AE%A1%E6%95%B0dp/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://loj.ac/problem/6089">LOJ&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>求长度为 $n$ 逆序对数为 $k$ 的排列个数。&lt;/p>
&lt;p>$1\le n, k\le 10^5$，$k\le \binom n 2$&lt;/p></description></item><item><title>LOJ6089 小Y的背包计数问题（根号分治，计数dp）</title><link>https://ouuan.github.io/post/loj6089-%E5%B0%8Fy%E7%9A%84%E8%83%8C%E5%8C%85%E8%AE%A1%E6%95%B0%E9%97%AE%E9%A2%98%E6%A0%B9%E5%8F%B7%E5%88%86%E6%B2%BB%E8%AE%A1%E6%95%B0dp/</link><pubDate>Wed, 04 Sep 2019 09:21:35 +0800</pubDate><guid>https://ouuan.github.io/post/loj6089-%E5%B0%8Fy%E7%9A%84%E8%83%8C%E5%8C%85%E8%AE%A1%E6%95%B0%E9%97%AE%E9%A2%98%E6%A0%B9%E5%8F%B7%E5%88%86%E6%B2%BB%E8%AE%A1%E6%95%B0dp/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://loj.ac/problem/6089">LOJ&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>你有体积为 $i$ ($1\le i\le n$) 的物品 $i$ 个，同体积物品在计数时没有区别，求装满大小为 $n$ 的背包的方案数。&lt;/p>
&lt;p>$1\le n\le 10^5$。&lt;/p></description></item><item><title>LGV 引理学习笔记</title><link>https://ouuan.github.io/post/lgv-%E5%BC%95%E7%90%86%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/</link><pubDate>Tue, 03 Sep 2019 21:54:43 +0800</pubDate><guid>https://ouuan.github.io/post/lgv-%E5%BC%95%E7%90%86%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/</guid><description>&lt;p>Lindström–Gessel–Viennot lemma，即 LGV 引理，可以用来处理有向无环图上不相交路径计数等问题。&lt;/p></description></item><item><title>CF1208G Polygons（数论）</title><link>https://ouuan.github.io/post/cf1208g-polygons%E6%95%B0%E8%AE%BA/</link><pubDate>Tue, 27 Aug 2019 20:08:56 +0800</pubDate><guid>https://ouuan.github.io/post/cf1208g-polygons%E6%95%B0%E8%AE%BA/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="http://codeforces.com/contest/1208/problem/G">CF&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://www.luogu.org/problem/CF1208G">洛谷&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>给定 $n$ 和 $k$，你需要在圆上画 $k$ 个不超过 $n$ 条边的正多边形，求顶点去重后至少有多少个。&lt;/p>
&lt;p>$3\le n\le10^6$，$1\le k\le n-2$。&lt;/p></description></item><item><title>一些注意事项</title><link>https://ouuan.github.io/post/%E4%B8%80%E4%BA%9B%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9/</link><pubDate>Mon, 19 Aug 2019 00:22:36 +0800</pubDate><guid>https://ouuan.github.io/post/%E4%B8%80%E4%BA%9B%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9/</guid><description>&lt;blockquote>
&lt;p>—— 简单题不 sb 是什么水平？&lt;/p>
&lt;p>—— 国家队水平。&lt;/p>
&lt;/blockquote></description></item><item><title>AGC007F Shik and Copying String（贪心，实现）</title><link>https://ouuan.github.io/post/agc007f-shik-and-copying-string%E8%B4%AA%E5%BF%83%E5%AE%9E%E7%8E%B0/</link><pubDate>Fri, 16 Aug 2019 23:34:10 +0800</pubDate><guid>https://ouuan.github.io/post/agc007f-shik-and-copying-string%E8%B4%AA%E5%BF%83%E5%AE%9E%E7%8E%B0/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://www.luogu.org/problem/AT2173">洛谷&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://atcoder.jp/contests/agc007/tasks/agc007_f">AtCoder&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>给你初始串 $S_0$ 和目标串 $T$，每一步操作可以将当前串 $S_i$ 变成 $S_{i+1}$，其中：&lt;/p>
&lt;p>$$S_{i+1}[j]=\begin{cases}S_i[1]&amp;amp;j=1\\S_i[j]\text{ 或 }S_{i+1}[j-1]&amp;amp;j&amp;gt;1\end{cases}$$&lt;/p>
&lt;p>求最少需要几次操作可以将当前串变为 $T$。&lt;/p>
&lt;p>串长 $10^6​$。&lt;/p></description></item><item><title>一些有趣的小工程</title><link>https://ouuan.github.io/post/%E4%B8%80%E4%BA%9B%E6%9C%89%E8%B6%A3%E7%9A%84%E5%B0%8F%E5%B7%A5%E7%A8%8B/</link><pubDate>Sat, 10 Aug 2019 19:22:23 +0800</pubDate><guid>https://ouuan.github.io/post/%E4%B8%80%E4%BA%9B%E6%9C%89%E8%B6%A3%E7%9A%84%E5%B0%8F%E5%B7%A5%E7%A8%8B/</guid><description>&lt;blockquote>
&lt;p>说实话我觉得竞赛题目挺坑爹的……木有啥意思。人类为何要出题刁难人类。&lt;/p>
&lt;p>我更喜欢做的事情是写点工程啥的 &amp;gt;_&amp;lt;&amp;hellip; 做做小游戏挺好玩的。&lt;/p>
&lt;p>—— vfk 《四色的 NOI》&lt;/p>
&lt;/blockquote>
&lt;p>（&lt;del>这算哪门子引用啊&lt;/del>）&lt;/p></description></item><item><title>BZOJ1758 [WC2010]重建计划（二分答案，长链剖分）</title><link>https://ouuan.github.io/post/bzoj1758-wc2010-%E9%87%8D%E5%BB%BA%E8%AE%A1%E5%88%92%E4%BA%8C%E5%88%86%E7%AD%94%E6%A1%88%E9%95%BF%E9%93%BE%E5%89%96%E5%88%86/</link><pubDate>Tue, 23 Jul 2019 20:24:05 +0800</pubDate><guid>https://ouuan.github.io/post/bzoj1758-wc2010-%E9%87%8D%E5%BB%BA%E8%AE%A1%E5%88%92%E4%BA%8C%E5%88%86%E7%AD%94%E6%A1%88%E9%95%BF%E9%93%BE%E5%89%96%E5%88%86/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://www.luogu.org/problemnew/show/P4292">洛谷&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>给你一棵带边权的树，求所有长度在 $[L,U]$ 这个范围内的路径里平均权值（总权值除以边数）的最大值。&lt;/p>
&lt;p>$2\le n\le 10^5$，保证至少有一条满足要求的路径。&lt;/p></description></item><item><title>NIO9102 落雨大</title><link>https://ouuan.github.io/post/nio9102-%E8%90%BD%E9%9B%A8%E5%A4%A7/</link><pubDate>Mon, 15 Jul 2019 09:48:38 +0800</pubDate><guid>https://ouuan.github.io/post/nio9102-%E8%90%BD%E9%9B%A8%E5%A4%A7/</guid><description>&lt;blockquote>
&lt;p>我也来到 NOI 了，呢。&lt;/p>
&lt;/blockquote></description></item><item><title>C++11 enable_if 的使用</title><link>https://ouuan.github.io/post/c-11-enable-if-%E7%9A%84%E4%BD%BF%E7%94%A8/</link><pubDate>Wed, 03 Jul 2019 01:24:13 +0800</pubDate><guid>https://ouuan.github.io/post/c-11-enable-if-%E7%9A%84%E4%BD%BF%E7%94%A8/</guid><description>&lt;p>今天想更新一下自己的 &lt;a href="https://github.com/ouuan/CF-template">CF 模板&lt;/a>，然后发现由于写法问题可能要给每种整型（int，long，long long，unsigned int，unsigned long long……）分别定义函数，于是尝试搜了一下有没有什么好的代码重用方式，发现了 enable_if，还挺好用的，但去网上搜教程可能比较难学..我乱搞了两三个小时才学会。于是就来分享一下..&lt;/p></description></item><item><title>Surreal Numbers 阅读笔记</title><link>https://ouuan.github.io/post/surreal-numbers-%E9%98%85%E8%AF%BB%E7%AC%94%E8%AE%B0/</link><pubDate>Wed, 26 Jun 2019 15:05:09 +0800</pubDate><guid>https://ouuan.github.io/post/surreal-numbers-%E9%98%85%E8%AF%BB%E7%AC%94%E8%AE%B0/</guid><description>&lt;p>今天模拟赛遇到了一道需要超现实数的题目，赛后在阅读 &lt;a href="http://www.matrix67.com/blog/archives/6333">Matrix67 的博客&lt;/a> 时听说了唐纳德所著的《Surreal Numbers》（中译：研究之美）这本书，于是就阅读了一下。&lt;/p>
&lt;p>大约会把书里的定理证一遍吧..&lt;/p>
&lt;p>学习超现实数的时候请假装自己不知道关于数字的一切知识，并且不要把定义的名字真的当回事（某些定义有着熟悉的名字，但可能与我们熟知的意义相同，也可能不同）。&lt;/p>
&lt;p>&lt;a href="https://ouuan.github.io/post_doc/%5B%E7%A0%94%E7%A9%B6%E4%B9%8B%E7%BE%8E%5D.%EF%BC%88%E7%BE%8E%EF%BC%89%E9%AB%98%E5%BE%B7%E7%BA%B3.%E6%89%AB%E6%8F%8F%E7%89%88.pdf">小说下载&lt;/a>&lt;/p></description></item><item><title>CF708C Centroids（树形dp，up and down）</title><link>https://ouuan.github.io/post/cf708c-centroids%E6%A0%91%E5%BD%A2dpup-and-down/</link><pubDate>Sun, 23 Jun 2019 21:34:21 +0800</pubDate><guid>https://ouuan.github.io/post/cf708c-centroids%E6%A0%91%E5%BD%A2dpup-and-down/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://codeforc.es/contest/708/problem/C">CF&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://www.luogu.org/problemnew/show/CF708C">洛谷&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>给你一棵 $n$ 个点的树，对每个点，判断能否删去一条边再加上一条边，使得这个点成为树的重心。（树的重心：将其删去后每个联通块大小不超过 $\frac n 2$）&lt;/p>
&lt;p>$2\le n\le 4\cdot10^5​$&lt;/p></description></item><item><title>BZOJ2115 [WC2011]最大XOR和路径（线性基，图论）</title><link>https://ouuan.github.io/post/bzoj2115-wc2011-%E6%9C%80%E5%A4%A7xor%E5%92%8C%E8%B7%AF%E5%BE%84%E7%BA%BF%E6%80%A7%E5%9F%BA%E5%9B%BE%E8%AE%BA/</link><pubDate>Sun, 16 Jun 2019 20:46:02 +0800</pubDate><guid>https://ouuan.github.io/post/bzoj2115-wc2011-%E6%9C%80%E5%A4%A7xor%E5%92%8C%E8%B7%AF%E5%BE%84%E7%BA%BF%E6%80%A7%E5%9F%BA%E5%9B%BE%E8%AE%BA/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://www.luogu.org/problemnew/show/P4151">洛谷&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://darkbzoj.tk/problem/2115">darkbzoj&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>给你一张带边权的无向图，求 $1$ 到 $n$ 的边权异或和最大的路径。&lt;/p>
&lt;p>点数 $5\times 10^4$，边数 $10^5$。&lt;/p></description></item><item><title>ouuan 的出题规范</title><link>https://ouuan.github.io/post/ouuan-%E7%9A%84%E5%87%BA%E9%A2%98%E8%A7%84%E8%8C%83/</link><pubDate>Sun, 16 Jun 2019 11:24:12 +0800</pubDate><guid>https://ouuan.github.io/post/ouuan-%E7%9A%84%E5%87%BA%E9%A2%98%E8%A7%84%E8%8C%83/</guid><description>&lt;p>首先，你需要意识到，自己出的题是要 &lt;strong>给别人做&lt;/strong> 的。&lt;/p></description></item><item><title>BZOJ2460 [BJWC2011]元素（线性基，贪心）</title><link>https://ouuan.github.io/post/bzoj2460-bjwc2011-%E5%85%83%E7%B4%A0%E7%BA%BF%E6%80%A7%E5%9F%BA%E8%B4%AA%E5%BF%83/</link><pubDate>Fri, 14 Jun 2019 22:00:27 +0800</pubDate><guid>https://ouuan.github.io/post/bzoj2460-bjwc2011-%E5%85%83%E7%B4%A0%E7%BA%BF%E6%80%A7%E5%9F%BA%E8%B4%AA%E5%BF%83/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://www.luogu.org/problemnew/show/P4570">洛谷&lt;/a>&lt;/p>
&lt;p>&lt;a href="http://darkbzoj.tk/problem/2460">darkbzoj&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>给你 $n$ 个带权值的数（数和权值是两个东西），求一个权值最大的异或线性无关子集，即取这个子集的任意一个非空子集，异或和都不为零。&lt;/p>
&lt;p>原题 $n\le1000$，实际上可以轻松 $n\le10^5$。数 $10^{18}$，权值 $10^4$。&lt;/p></description></item><item><title>线性基学习笔记</title><link>https://ouuan.github.io/post/%E7%BA%BF%E6%80%A7%E5%9F%BA%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/</link><pubDate>Wed, 12 Jun 2019 15:20:12 +0800</pubDate><guid>https://ouuan.github.io/post/%E7%BA%BF%E6%80%A7%E5%9F%BA%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/</guid><description>&lt;p>又是在网上搜不到讲的比较清楚的博客的算法&amp;hellip;虽然没找到写的好的博客，但结合若干篇写的不算太差的博客，勉强是学会了..&lt;/p>
&lt;p>线性基在 OI 中特指集合为若干个非负整数，运算为异或的线性基，通常用来处理一些异或相关的问题。&lt;/p></description></item><item><title>bad round 与出题人的坚守</title><link>https://ouuan.github.io/post/bad-round-%E4%B8%8E%E5%87%BA%E9%A2%98%E4%BA%BA%E7%9A%84%E5%9D%9A%E5%AE%88/</link><pubDate>Sun, 09 Jun 2019 12:56:10 +0800</pubDate><guid>https://ouuan.github.io/post/bad-round-%E4%B8%8E%E5%87%BA%E9%A2%98%E4%BA%BA%E7%9A%84%E5%9D%9A%E5%AE%88/</guid><description>&lt;blockquote>
&lt;p>等你等了五千年，只为这一刹那的回眸一笑。&lt;/p>
&lt;/blockquote>
&lt;p>这句话作为台前幕后的标准开头应该是没问题的。&lt;/p>
&lt;p>只不过果然还是写不出 vfk 的水平啊&amp;hellip;写的比较散乱。而且是前后断断续续地写的，有的写于赛前，有的写于赛后，所以会有行文不连贯的地方，可能也会有后来忘记修正的地方。&lt;/p>
&lt;p>&lt;a href="https://codeforces.com/contests/1172,1173">比赛地址&lt;/a>&lt;/p></description></item><item><title>Codeforces Round #564 中文题解</title><link>https://ouuan.github.io/post/codeforces-round-564-%E4%B8%AD%E6%96%87%E9%A2%98%E8%A7%A3/</link><pubDate>Fri, 07 Jun 2019 22:38:47 +0800</pubDate><guid>https://ouuan.github.io/post/codeforces-round-564-%E4%B8%AD%E6%96%87%E9%A2%98%E8%A7%A3/</guid><description>&lt;p>&lt;a href="https://ouuan.github.io/bad-round-%E4%B8%8E%E5%87%BA%E9%A2%98%E4%BA%BA%E7%9A%84%E5%9D%9A%E5%AE%88">台前幕后&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://codeforces.com/contests/1172,1173">比赛地址&lt;/a>&lt;/p></description></item><item><title>使用 testlib.h 写 lemon SPJ</title><link>https://ouuan.github.io/post/%E4%BD%BF%E7%94%A8-testlib-h-%E5%86%99-lemon-spj/</link><pubDate>Wed, 22 May 2019 13:59:32 +0800</pubDate><guid>https://ouuan.github.io/post/%E4%BD%BF%E7%94%A8-testlib-h-%E5%86%99-lemon-spj/</guid><description>&lt;p>不用 testlib.h 是不可能写好 checker 的（逃&lt;/p></description></item><item><title>300iq奔北坡</title><link>https://ouuan.github.io/post/300iq%E5%A5%94%E5%8C%97%E5%9D%A1/</link><pubDate>Sun, 12 May 2019 21:45:13 +0800</pubDate><guid>https://ouuan.github.io/post/300iq%E5%A5%94%E5%8C%97%E5%9D%A1/</guid><description>&lt;p>由于实在想不到这次是什么记了，所以就叫 300iq 奔北坡好了。&lt;/p>
&lt;p>实际上是一篇 CTS &amp;amp; APIO &amp;amp; THUSC 2019 游记。&lt;/p></description></item><item><title>回文自动机（PAM）学习笔记</title><link>https://ouuan.github.io/post/%E5%9B%9E%E6%96%87%E8%87%AA%E5%8A%A8%E6%9C%BApam%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/</link><pubDate>Fri, 10 May 2019 22:31:05 +0800</pubDate><guid>https://ouuan.github.io/post/%E5%9B%9E%E6%96%87%E8%87%AA%E5%8A%A8%E6%9C%BApam%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/</guid><description>&lt;p>PAM 是一种处理回文串相关问题的有力工具。&lt;/p>
&lt;p>&lt;del>又是一句废话。&lt;/del>&lt;/p></description></item><item><title>CF17E Palisection（manacher）</title><link>https://ouuan.github.io/post/cf17e-palisectionmanacher/</link><pubDate>Fri, 10 May 2019 22:06:18 +0800</pubDate><guid>https://ouuan.github.io/post/cf17e-palisectionmanacher/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://www.luogu.org/problemnew/show/CF17E">洛谷&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://codeforces.com/contest/17/problem/E">CF&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>给你一个字符串，求有多少对相交的回文子串。（包含算作相交，&lt;del>自交不算&lt;/del>）&lt;/p>
&lt;p>字符串长度小于等于 $2\times 10^6$。&lt;/p></description></item><item><title>CF432D Prefixes and Suffixes（KMP）</title><link>https://ouuan.github.io/post/cf432d-prefixes-and-suffixeskmp/</link><pubDate>Fri, 10 May 2019 21:56:54 +0800</pubDate><guid>https://ouuan.github.io/post/cf432d-prefixes-and-suffixeskmp/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://www.luogu.org/problemnew/show/CF432D">洛谷&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://codeforces.com/contest/432/problem/D">CF&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>给你一个字符串，分别求出每个长度的既是其前缀又是其后缀的串出现的次数。&lt;/p>
&lt;p>字符串长度小于等于 $10^5$。&lt;/p></description></item><item><title>CF494B Obsessive String (KMP,计数dp)</title><link>https://ouuan.github.io/post/cf494b-obsessive-string-kmp-%E8%AE%A1%E6%95%B0dp/</link><pubDate>Sun, 05 May 2019 13:16:44 +0800</pubDate><guid>https://ouuan.github.io/post/cf494b-obsessive-string-kmp-%E8%AE%A1%E6%95%B0dp/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://www.luogu.org/problemnew/show/CF494B">洛谷&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://codeforces.com/contest/494/problem/B">CF contest&lt;/a>&lt;/p>
&lt;p>&lt;a href="http://codeforces.com/problemset/problem/494/B">CF problemset&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>给你两个字符串 $S$ 和 $T$，你需要在 $S$ 中取若干个（至少一个）不相交的子串，使得每个子串都包含 $T$，求方案数模 $10^9+7$。&lt;/p>
&lt;p>字符串长度小于等于 $10^5$。&lt;/p></description></item><item><title>BZOJ1009 [HNOI2008]GT考试（KMP/AC自动机，矩阵乘法）</title><link>https://ouuan.github.io/post/bzoj1009-hnoi2008-gt%E8%80%83%E8%AF%95kmp-ac%E8%87%AA%E5%8A%A8%E6%9C%BA%E7%9F%A9%E9%98%B5%E4%B9%98%E6%B3%95/</link><pubDate>Fri, 03 May 2019 19:07:11 +0800</pubDate><guid>https://ouuan.github.io/post/bzoj1009-hnoi2008-gt%E8%80%83%E8%AF%95kmp-ac%E8%87%AA%E5%8A%A8%E6%9C%BA%E7%9F%A9%E9%98%B5%E4%B9%98%E6%B3%95/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://www.luogu.org/problemnew/show/P3193">洛谷&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://darkbzoj.tk/problem/1009">darkbzoj&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>给一个长为 $m$ 的字符串，字符集 $0$ ~ $9$，求长为 $n$ 的字符串中不含给定字符串作为子串的字符串有多少个，对 $k$ 取模。&lt;/p>
&lt;p>$n\le10^9$，$m\le20$，$k\le1000$。&lt;/p></description></item><item><title>BZOJ2434 [NOI2011]阿狸的打字机（AC自动机，树状数组）</title><link>https://ouuan.github.io/post/bzoj2434-noi2011-%E9%98%BF%E7%8B%B8%E7%9A%84%E6%89%93%E5%AD%97%E6%9C%BAac%E8%87%AA%E5%8A%A8%E6%9C%BA%E6%A0%91%E7%8A%B6%E6%95%B0%E7%BB%84/</link><pubDate>Mon, 29 Apr 2019 21:36:58 +0800</pubDate><guid>https://ouuan.github.io/post/bzoj2434-noi2011-%E9%98%BF%E7%8B%B8%E7%9A%84%E6%89%93%E5%AD%97%E6%9C%BAac%E8%87%AA%E5%8A%A8%E6%9C%BA%E6%A0%91%E7%8A%B6%E6%95%B0%E7%BB%84/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://www.luogu.org/problemnew/show/P2414">洛谷&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://darkbzoj.tk/problem/2434">darkbzoj&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>初始一个空串，三种操作：&lt;/p>
&lt;ol>
&lt;li>添加一个字符。&lt;/li>
&lt;li>删除一个字符。&lt;/li>
&lt;li>打印当前字符串、&lt;/li>
&lt;/ol>
&lt;p>多组询问，每次问第 $x$ 个打印的字符串在第 $y$ 个打印的字符串中出现了几次。&lt;/p>
&lt;p>操作数和询问数都不超过 $10^5$。&lt;/p></description></item><item><title>AC自动机学习笔记</title><link>https://ouuan.github.io/post/ac%E8%87%AA%E5%8A%A8%E6%9C%BA%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/</link><pubDate>Mon, 29 Apr 2019 15:39:10 +0800</pubDate><guid>https://ouuan.github.io/post/ac%E8%87%AA%E5%8A%A8%E6%9C%BA%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/</guid><description>&lt;p>AC 自动机其实我去年就学过了，但当时大约只是会敲模板而已..现在几乎全忘光了。于是复习一下，顺便（较为本质地）讲解一下。&lt;/p></description></item><item><title>[NOI2010]航空管制（建反图，拓扑排序，优先队列）</title><link>https://ouuan.github.io/post/noi2010-%E8%88%AA%E7%A9%BA%E7%AE%A1%E5%88%B6%E5%BB%BA%E5%8F%8D%E5%9B%BE%E6%8B%93%E6%89%91%E6%8E%92%E5%BA%8F%E4%BC%98%E5%85%88%E9%98%9F%E5%88%97/</link><pubDate>Fri, 19 Apr 2019 13:00:29 +0800</pubDate><guid>https://ouuan.github.io/post/noi2010-%E8%88%AA%E7%A9%BA%E7%AE%A1%E5%88%B6%E5%BB%BA%E5%8F%8D%E5%9B%BE%E6%8B%93%E6%89%91%E6%8E%92%E5%BA%8F%E4%BC%98%E5%85%88%E9%98%9F%E5%88%97/</guid><description>&lt;h2 id="题目链接">题目链接&lt;/h2>
&lt;p>&lt;a href="https://www.luogu.org/problemnew/show/P1954">洛谷&lt;/a>&lt;/p>
&lt;h2 id="题意简述">题意简述&lt;/h2>
&lt;p>给你一个 DAG，每个点有个值 $k_i$。&lt;/p>
&lt;p>第一问：求一个拓扑排序，使每个点出现的位置不超过 $k_i$。&lt;/p>
&lt;p>第二问：在满足第一问的拓扑排序中，求每个点分别的最早出现位置。&lt;/p></description></item><item><title>十二省联考2019 游记 &amp; 题解</title><link>https://ouuan.github.io/post/%E5%8D%81%E4%BA%8C%E7%9C%81%E8%81%94%E8%80%832019-%E6%B8%B8%E8%AE%B0-%E9%A2%98%E8%A7%A3/</link><pubDate>Mon, 08 Apr 2019 15:39:51 +0800</pubDate><guid>https://ouuan.github.io/post/%E5%8D%81%E4%BA%8C%E7%9C%81%E8%81%94%E8%80%832019-%E6%B8%B8%E8%AE%B0-%E9%A2%98%E8%A7%A3/</guid><description>&lt;p>口中喊着「僕勝つから。ぜったい、勝て来るから。」的你，真的付出了桐山般的努力吗？&lt;/p></description></item><item><title>树分块学习笔记</title><link>https://ouuan.github.io/post/%E6%A0%91%E5%88%86%E5%9D%97%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/</link><pubDate>Sat, 30 Mar 2019 21:18:50 +0800</pubDate><guid>https://ouuan.github.io/post/%E6%A0%91%E5%88%86%E5%9D%97%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/</guid><description>&lt;p>最近发现 &lt;a href="https://oi-wiki.org/">OI Wiki&lt;/a> 的“树分块”是空的，本来想凭着之前写的&lt;a href="https://ouuan.github.io/post/%E8%8E%AB%E9%98%9F%E5%B8%A6%E4%BF%AE%E8%8E%AB%E9%98%9F%E6%A0%91%E4%B8%8A%E8%8E%AB%E9%98%9F%E8%AF%A6%E8%A7%A3/">莫队教程&lt;/a>水一水，结果被告知已经有人写过树上莫队了..于是就得详细介绍一下树分块除了树上莫队以外的应用..然而我除了糖果公园只做过一道树分块..（结果最后并没有找到这道题以外的其它题..）&lt;/p></description></item><item><title>2019省选复习周做题计划</title><link>https://ouuan.github.io/post/2019%E7%9C%81%E9%80%89%E5%A4%8D%E4%B9%A0%E5%91%A8%E5%81%9A%E9%A2%98%E8%AE%A1%E5%88%92/</link><pubDate>Sat, 30 Mar 2019 09:25:04 +0800</pubDate><guid>https://ouuan.github.io/post/2019%E7%9C%81%E9%80%89%E5%A4%8D%E4%B9%A0%E5%91%A8%E5%81%9A%E9%A2%98%E8%AE%A1%E5%88%92/</guid><description>&lt;p>随便找了点省选前需要复习的知识点相关的题目..&lt;/p></description></item><item><title>树状数组——从背模板到树套树</title><link>https://ouuan.github.io/post/%E6%A0%91%E7%8A%B6%E6%95%B0%E7%BB%84%E4%BB%8E%E8%83%8C%E6%A8%A1%E6%9D%BF%E5%88%B0%E6%A0%91%E5%A5%97%E6%A0%91/</link><pubDate>Tue, 26 Mar 2019 21:38:45 +0800</pubDate><guid>https://ouuan.github.io/post/%E6%A0%91%E7%8A%B6%E6%95%B0%E7%BB%84%E4%BB%8E%E8%83%8C%E6%A8%A1%E6%9D%BF%E5%88%B0%E6%A0%91%E5%A5%97%E6%A0%91/</guid><description>&lt;p>&lt;del>这是一篇披着PJ组数据结构外衣的树套树教程。&lt;/del>&lt;/p>
&lt;p>大约会（尝试着）较为本质地简介一下树状数组？&lt;/p></description></item><item><title>cdq分治学习笔记</title><link>https://ouuan.github.io/post/cdq%E5%88%86%E6%B2%BB%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/</link><pubDate>Tue, 26 Mar 2019 18:49:44 +0800</pubDate><guid>https://ouuan.github.io/post/cdq%E5%88%86%E6%B2%BB%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/</guid><description>&lt;p>cdq分治也是咕了好久了..最近总算把它学了。&lt;/p>
&lt;p>&lt;del>cdq分治是一种离线算法，可以代替一些复杂的数据结构，降低代码难度，减小常数。&lt;/del>废话大家都知道。&lt;/p></description></item><item><title>BZOJ4259 残缺的字符串（FFT）</title><link>https://ouuan.github.io/post/bzoj4259-%E6%AE%8B%E7%BC%BA%E7%9A%84%E5%AD%97%E7%AC%A6%E4%B8%B2fft/</link><pubDate>Tue, 19 Mar 2019 16:27:51 +0800</pubDate><guid>https://ouuan.github.io/post/bzoj4259-%E6%AE%8B%E7%BC%BA%E7%9A%84%E5%AD%97%E7%AC%A6%E4%B8%B2fft/</guid><description>&lt;h1 id="题目链接">题目链接&lt;/h1>
&lt;p>&lt;a href="https://www.luogu.org/problemnew/show/P4173">洛谷&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://darkbzoj.tk/problem/4259">darkbzoj&lt;/a>&lt;/p>
&lt;h1 id="题意简述">题意简述&lt;/h1>
&lt;p>带通配符的单模式串、单文本串匹配。&lt;/p>
&lt;p>字符串长度 $3\times10^5$。&lt;/p></description></item><item><title>2019YALI省选集训垫底记</title><link>https://ouuan.github.io/post/2019yali%E7%9C%81%E9%80%89%E9%9B%86%E8%AE%AD%E5%9E%AB%E5%BA%95%E8%AE%B0/</link><pubDate>Sun, 17 Mar 2019 19:36:39 +0800</pubDate><guid>https://ouuan.github.io/post/2019yali%E7%9C%81%E9%80%89%E9%9B%86%E8%AE%AD%E5%9E%AB%E5%BA%95%E8%AE%B0/</guid><description>&lt;p>时隔半年又来到了YALI。&lt;/p></description></item><item><title>BZOJ3622 已经没有什么好害怕的了（二项式反演，组合数学）</title><link>https://ouuan.github.io/post/bzoj3622-%E5%B7%B2%E7%BB%8F%E6%B2%A1%E6%9C%89%E4%BB%80%E4%B9%88%E5%A5%BD%E5%AE%B3%E6%80%95%E7%9A%84%E4%BA%86%E4%BA%8C%E9%A1%B9%E5%BC%8F%E5%8F%8D%E6%BC%94%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6/</link><pubDate>Fri, 15 Mar 2019 12:48:17 +0800</pubDate><guid>https://ouuan.github.io/post/bzoj3622-%E5%B7%B2%E7%BB%8F%E6%B2%A1%E6%9C%89%E4%BB%80%E4%B9%88%E5%A5%BD%E5%AE%B3%E6%80%95%E7%9A%84%E4%BA%86%E4%BA%8C%E9%A1%B9%E5%BC%8F%E5%8F%8D%E6%BC%94%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6/</guid><description>&lt;h1 id="题目链接">题目链接&lt;/h1>
&lt;p>&lt;a href="https://www.luogu.org/problemnew/show/P4859">洛谷&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://darkbzoj.tk/problem/3622">darkbzoj&lt;/a>&lt;/p>
&lt;h1 id="题意简述">题意简述&lt;/h1>
&lt;p>给你两个长为 $n$ 、无重复元素的数列 $a,b$，求将 $b$ 重排后 $\left(\sum\limits_{i=1}^n[a_i&amp;gt;b_i]\right)-\left(\sum\limits_{i=1}^n[a_i&amp;lt;b_i]\right)=k$（$k$ 给定）的方案数。&lt;/p>
&lt;p>$n\le2000$。&lt;/p></description></item><item><title>BZOJ4665 小w的喜糖（容斥原理，组合数学）</title><link>https://ouuan.github.io/post/bzoj4665-%E5%B0%8Fw%E7%9A%84%E5%96%9C%E7%B3%96%E5%AE%B9%E6%96%A5%E5%8E%9F%E7%90%86%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6/</link><pubDate>Wed, 13 Mar 2019 21:10:56 +0800</pubDate><guid>https://ouuan.github.io/post/bzoj4665-%E5%B0%8Fw%E7%9A%84%E5%96%9C%E7%B3%96%E5%AE%B9%E6%96%A5%E5%8E%9F%E7%90%86%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6/</guid><description>&lt;h1 id="题目链接">题目链接&lt;/h1>
&lt;p>&lt;a href="https://darkbzoj.tk/problem/4665">darkbzoj&lt;/a>&lt;/p>
&lt;h1 id="题意简述">题意简述&lt;/h1>
&lt;p>给你一个数列，求重排后每个位置都变了的方案数。&lt;/p>
&lt;p>数列长度和值域都是 $2000$。&lt;/p></description></item><item><title>BZOJ4003 [JLOI2015]城池攻占（左偏树）</title><link>https://ouuan.github.io/post/bzoj4003-jloi2015-%E5%9F%8E%E6%B1%A0%E6%94%BB%E5%8D%A0%E5%B7%A6%E5%81%8F%E6%A0%91/</link><pubDate>Tue, 12 Mar 2019 16:14:15 +0800</pubDate><guid>https://ouuan.github.io/post/bzoj4003-jloi2015-%E5%9F%8E%E6%B1%A0%E6%94%BB%E5%8D%A0%E5%B7%A6%E5%81%8F%E6%A0%91/</guid><description>&lt;h1 id="题目链接">题目链接&lt;/h1>
&lt;p>&lt;a href="https://www.luogu.org/problemnew/show/P3261">洛谷&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://darkbzoj.tk/problem/4003">darkbzoj&lt;/a>&lt;/p>
&lt;h1 id="题意简述">题意简述&lt;/h1>
&lt;p>给你一棵树，每个节点有 $h$ 值，一个勇士来到一个节点时如果他的战斗力大于等于 $h$ 就能占领城池并前往这个节点的父亲（除非已经到了根节点），否则阵亡；攻占一个节点后，勇士的战斗力会加/减/乘一个正整数（根据节点而定）；每个勇士有初始战斗力和想占领的第一个节点。问，每个节点各有多少个勇士阵亡，每个勇士各占领了几个节点。&lt;/p></description></item><item><title>CF235C Cyclical Quest（SAM）</title><link>https://ouuan.github.io/post/cf235c-cyclical-questsam/</link><pubDate>Wed, 27 Feb 2019 13:23:19 +0800</pubDate><guid>https://ouuan.github.io/post/cf235c-cyclical-questsam/</guid><description>&lt;h1 id="题目链接">题目链接&lt;/h1>
&lt;p>&lt;a href="https://www.luogu.org/problemnew/show/CF235C">洛谷&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://codeforces.com/problemset/problem/235/C">CF problemset&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://codeforces.com/contest/235/problem/C">CF contest&lt;/a>&lt;/p>
&lt;h1 id="题意简述">题意简述&lt;/h1>
&lt;p>给你一个字符串 $s$ 和 $n$ 个字符串 $x_{1..n}$，对每个 $x_i$，求有多少个 $s$ 的子串可以由 $x_i$ 旋转得到。&lt;/p>
&lt;p>旋转一个字符串就是把它的一个前缀移到后面，如 &lt;code>abcd&lt;/code> 可以旋转得到的字符串有 &lt;code>abcd&lt;/code>，&lt;code>bcda&lt;/code>，&lt;code>cdab&lt;/code>，&lt;code>dabc&lt;/code>。&lt;/p></description></item><item><title>后缀自动机（SAM）学习笔记</title><link>https://ouuan.github.io/post/%E5%90%8E%E7%BC%80%E8%87%AA%E5%8A%A8%E6%9C%BAsam%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/</link><pubDate>Fri, 22 Feb 2019 12:31:37 +0800</pubDate><guid>https://ouuan.github.io/post/%E5%90%8E%E7%BC%80%E8%87%AA%E5%8A%A8%E6%9C%BAsam%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/</guid><description>&lt;p>后缀自动机是一种处理字符串问题的有力工具（废话），它的码量不比后缀数组大（实际代码难度不比后缀数组小，但也不难），处理问题时的思维难度往往比后缀数组小，复杂度更优秀。若字符集大小为 $|\Sigma|$，则：构建时间复杂度 $O(n|\Sigma|)$，转移时间复杂度 $O(1)$，空间复杂度 $O(n|\Sigma|)$ 或 构建时间复杂度 $O(n\log|\Sigma|)$，转移时间复杂度 $O(\log|\Sigma|)$，空间复杂度 $O(n)$。&lt;/p></description></item><item><title>P3804 【模板】后缀自动机（SAM/后缀数组）</title><link>https://ouuan.github.io/post/p3804-%E6%A8%A1%E6%9D%BF%E5%90%8E%E7%BC%80%E8%87%AA%E5%8A%A8%E6%9C%BA/</link><pubDate>Thu, 21 Feb 2019 15:47:52 +0800</pubDate><guid>https://ouuan.github.io/post/p3804-%E6%A8%A1%E6%9D%BF%E5%90%8E%E7%BC%80%E8%87%AA%E5%8A%A8%E6%9C%BA/</guid><description>&lt;h1 id="题目链接">题目链接&lt;/h1>
&lt;p>&lt;a href="https://www.luogu.org/problemnew/show/P3804">洛谷&lt;/a>&lt;/p>
&lt;h1 id="题意简述">题意简述&lt;/h1>
&lt;p>求 &lt;strong>出现次数不为 $1$ 的子串的 出现次数 $\times$ 长度&lt;/strong> 的最大值。&lt;/p></description></item><item><title>BZOJ4516 [SDOI2016]生成魔咒（SAM）</title><link>https://ouuan.github.io/post/bzoj4516-sdoi2016-%E7%94%9F%E6%88%90%E9%AD%94%E5%92%92sam/</link><pubDate>Thu, 21 Feb 2019 14:10:35 +0800</pubDate><guid>https://ouuan.github.io/post/bzoj4516-sdoi2016-%E7%94%9F%E6%88%90%E9%AD%94%E5%92%92sam/</guid><description>&lt;h1 id="题目链接">题目链接&lt;/h1>
&lt;p>&lt;a href="https://www.luogu.org/problemnew/show/P4070">洛谷&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://darkbzoj.tk/problem/4516">dark bzoj&lt;/a>&lt;/p>
&lt;h1 id="题意简述">题意简述&lt;/h1>
&lt;p>给你一个字符串（字符集大小 $10^9$，长度 $10^5$），求每个前缀的本质不同子串数。&lt;/p></description></item><item><title>后缀数组学习笔记</title><link>https://ouuan.github.io/post/%E5%90%8E%E7%BC%80%E6%95%B0%E7%BB%84%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/</link><pubDate>Sun, 17 Feb 2019 13:53:54 +0800</pubDate><guid>https://ouuan.github.io/post/%E5%90%8E%E7%BC%80%E6%95%B0%E7%BB%84%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/</guid><description>&lt;p>后缀数组是一种处理字符串问题的有力工具（废话），本文的主要特点是一步步地由最朴素的后缀数组构建方法逐步优化，而非直接给出最终优化后的代码。&lt;/p>
&lt;p>希望这篇文章能让更多的人看懂后缀数组的代码，学会后缀数组。&lt;/p></description></item><item><title>BZOJ4566 [HAOI2016]找相同字符（后缀数组）</title><link>https://ouuan.github.io/post/bzoj4566-haoi2016-%E6%89%BE%E7%9B%B8%E5%90%8C%E5%AD%97%E7%AC%A6%E5%90%8E%E7%BC%80%E6%95%B0%E7%BB%84/</link><pubDate>Thu, 14 Feb 2019 11:22:18 +0800</pubDate><guid>https://ouuan.github.io/post/bzoj4566-haoi2016-%E6%89%BE%E7%9B%B8%E5%90%8C%E5%AD%97%E7%AC%A6%E5%90%8E%E7%BC%80%E6%95%B0%E7%BB%84/</guid><description>&lt;h1 id="题目链接">题目链接&lt;/h1>
&lt;p>&lt;a href="https://www.luogu.org/problemnew/show/P3181">洛谷&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://darkbzoj.tk/problem/4566">dark bzoj&lt;/a>&lt;/p>
&lt;h1 id="题意简述">题意简述&lt;/h1>
&lt;p>给你两个字符串，从中各取一个子串使这两个子串相同，求方案数。&lt;/p></description></item><item><title>P2852 [USACO06DEC]Milk Patterns（后缀数组）</title><link>https://ouuan.github.io/post/p2852-usaco06dec-milk-patterns%E5%90%8E%E7%BC%80%E6%95%B0%E7%BB%84/</link><pubDate>Thu, 14 Feb 2019 11:21:26 +0800</pubDate><guid>https://ouuan.github.io/post/p2852-usaco06dec-milk-patterns%E5%90%8E%E7%BC%80%E6%95%B0%E7%BB%84/</guid><description>&lt;h1 id="题目链接">题目链接&lt;/h1>
&lt;p>&lt;a href="https://www.luogu.org/problemnew/show/P2852">洛谷&lt;/a>&lt;/p>
&lt;h1 id="题意简述">题意简述&lt;/h1>
&lt;p>给你一个字符串，求最长的出现了至少 $k$ 次的子串的长度。&lt;/p></description></item><item><title>P2870 [USACO07DEC]Best Cow Line, Gold（后缀数组）</title><link>https://ouuan.github.io/post/p2870-usaco07dec-best-cow-line-gold%E5%90%8E%E7%BC%80%E6%95%B0%E7%BB%84/</link><pubDate>Thu, 14 Feb 2019 11:20:59 +0800</pubDate><guid>https://ouuan.github.io/post/p2870-usaco07dec-best-cow-line-gold%E5%90%8E%E7%BC%80%E6%95%B0%E7%BB%84/</guid><description>&lt;h1 id="题目链接">题目链接&lt;/h1>
&lt;p>&lt;a href="https://www.luogu.org/problemnew/show/P2870">洛谷&lt;/a>&lt;/p>
&lt;h1 id="题意简述">题意简述&lt;/h1>
&lt;p>给你一个字符串，每次从首或尾取一个字符组成字符串，问所有能够组成的字符串中字典序最小的一个。&lt;/p></description></item><item><title>BZOJ1856 [SCOI2010]生成字符串（组合数学）</title><link>https://ouuan.github.io/post/bzoj1856-scoi2010-%E7%94%9F%E6%88%90%E5%AD%97%E7%AC%A6%E4%B8%B2%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6/</link><pubDate>Tue, 12 Feb 2019 14:56:42 +0800</pubDate><guid>https://ouuan.github.io/post/bzoj1856-scoi2010-%E7%94%9F%E6%88%90%E5%AD%97%E7%AC%A6%E4%B8%B2%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6/</guid><description>&lt;h1 id="题目链接">题目链接&lt;/h1>
&lt;p>&lt;a href="https://www.luogu.org/problemnew/show/P1641">洛谷&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://darkbzoj.tk/problem/1856">darkbzoj&lt;/a>&lt;/p>
&lt;h1 id="题意简述">题意简述&lt;/h1>
&lt;p>$n$ 个入栈操作，$m$ 个出栈操作，问合法操作序列数。&lt;/p></description></item><item><title>n方过百万 暴力碾标算——指令集优化的基础使用</title><link>https://ouuan.github.io/post/n%E6%96%B9%E8%BF%87%E7%99%BE%E4%B8%87-%E6%9A%B4%E5%8A%9B%E7%A2%BE%E6%A0%87%E7%AE%97%E6%8C%87%E4%BB%A4%E9%9B%86%E4%BC%98%E5%8C%96%E7%9A%84%E5%9F%BA%E7%A1%80%E4%BD%BF%E7%94%A8/</link><pubDate>Fri, 01 Feb 2019 14:26:52 +0800</pubDate><guid>https://ouuan.github.io/post/n%E6%96%B9%E8%BF%87%E7%99%BE%E4%B8%87-%E6%9A%B4%E5%8A%9B%E7%A2%BE%E6%A0%87%E7%AE%97%E6%8C%87%E4%BB%A4%E9%9B%86%E4%BC%98%E5%8C%96%E7%9A%84%E5%9F%BA%E7%A1%80%E4%BD%BF%E7%94%A8/</guid><description>感谢 yfz 和 mcfx 在 WC 营员交流上的分享！ 然而只看那个课件来学习指令集好像略有困难..所以我来分享一下我自学一晚上的成果。 希望能帮助大家暴力过题，考场</description></item><item><title>2019THUWC/WC冬眠记</title><link>https://ouuan.github.io/post/2019thuwc-wc%E5%86%AC%E7%9C%A0%E8%AE%B0/</link><pubDate>Sun, 20 Jan 2019 12:16:15 +0800</pubDate><guid>https://ouuan.github.io/post/2019thuwc-wc%E5%86%AC%E7%9C%A0%E8%AE%B0/</guid><description>&lt;p>&lt;del>又到了 Kanon 的季节呢&lt;/del>，快乐的冬眠生活开始了_(:з」∠)_&lt;/p></description></item><item><title>UER #8 —— 通信题：打雪仗</title><link>https://ouuan.github.io/post/uer-8-%E6%B8%B8%E8%AE%B0-%E9%80%9A%E4%BF%A1%E9%A2%98%E6%89%93%E9%9B%AA%E4%BB%97/</link><pubDate>Sat, 22 Dec 2018 23:03:25 +0800</pubDate><guid>https://ouuan.github.io/post/uer-8-%E6%B8%B8%E8%AE%B0-%E9%80%9A%E4%BF%A1%E9%A2%98%E6%89%93%E9%9B%AA%E4%BB%97/</guid><description>T1题目链接 大意：Alice 有一个长度为 $2n$ 的 $01$ 串 $s_{1..2n}$，Bob 有 $n$ 个下标 $p_{1..n}$，Alice 和 Bob 只能用 $01$ 通信，需</description></item><item><title>随机生成图片展示</title><link>https://ouuan.github.io/post/%E9%9A%8F%E6%9C%BA%E7%94%9F%E6%88%90%E5%9B%BE%E7%89%87%E5%B1%95%E7%A4%BA/</link><pubDate>Thu, 20 Dec 2018 23:12:18 +0800</pubDate><guid>https://ouuan.github.io/post/%E9%9A%8F%E6%9C%BA%E7%94%9F%E6%88%90%E5%9B%BE%E7%89%87%E5%B1%95%E7%A4%BA/</guid><description>传送门 源码按F12即可查看（当然也可以在 repo 里面看） 看到一个帖子里提到了一个140字符画图比赛，看到了 Martin Büttner&amp;rsquo;s code ，然后</description></item><item><title>Avito Cool Challenge 2018 游记</title><link>https://ouuan.github.io/post/avito-cool-challenge-2018-%E6%B8%B8%E8%AE%B0/</link><pubDate>Mon, 17 Dec 2018 22:47:17 +0800</pubDate><guid>https://ouuan.github.io/post/avito-cool-challenge-2018-%E6%B8%B8%E8%AE%B0/</guid><description>这两天比赛是真的多..碰上了场 Chinese Legends Round / HackForces 竟然在紫名涨了点分QAQ 看到 A，$gcd(x,x-1)=1$ ，这不是sb题吗？然后愉快地WA了&amp;he</description></item><item><title>CF edu 56 &amp; AT Grand 029 游记</title><link>https://ouuan.github.io/post/cf-edu-56-at-grand-029-%E6%B8%B8%E8%AE%B0/</link><pubDate>Sun, 16 Dec 2018 00:29:11 +0800</pubDate><guid>https://ouuan.github.io/post/cf-edu-56-at-grand-029-%E6%B8%B8%E8%AE%B0/</guid><description>今天 AT 和 CF 刚好连上了，于是就都打了一下。 关于模板 今天心血来潮把用于在线比赛的模板换了一下，加了点东西，然后发现 rep(1,l,r) 写起来非常不顺手..保留了部</description></item><item><title>html实现随机图片</title><link>https://ouuan.github.io/post/html%E5%AE%9E%E7%8E%B0%E9%9A%8F%E6%9C%BA%E5%9B%BE%E7%89%87/</link><pubDate>Wed, 12 Dec 2018 23:42:17 +0800</pubDate><guid>https://ouuan.github.io/post/html%E5%AE%9E%E7%8E%B0%E9%9A%8F%E6%9C%BA%E5%9B%BE%E7%89%87/</guid><description>注：暂时还不知道如何制作能被引用的随机图片，只能查看图片，而不能通过类似于![](图片地址)的方式查看。 demo 欢迎投稿图片：投稿地址 核心代码 &amp;lt;script type=&amp;quot;text/javascript&amp;quot;</description></item><item><title>2018~2019冬 广二避寒记</title><link>https://ouuan.github.io/post/2018-2019%E5%86%AC-%E5%B9%BF%E4%BA%8C%E9%81%BF%E5%AF%92%E8%AE%B0/</link><pubDate>Sun, 09 Dec 2018 15:31:27 +0800</pubDate><guid>https://ouuan.github.io/post/2018-2019%E5%86%AC-%E5%B9%BF%E4%BA%8C%E9%81%BF%E5%AF%92%E8%AE%B0/</guid><description>迎风迈出的步伐更艰难，即使走的不远，但踩得更深。一代人只能做一代人的事，完成这个时代赋予的使命就是英雄，大地也会将他的脚印铭记。 ——乒乓帝国</description></item><item><title>AtCoder Beginner Contest 115 游记</title><link>https://ouuan.github.io/post/atcoder-beginner-contest-115/</link><pubDate>Sat, 08 Dec 2018 21:50:43 +0800</pubDate><guid>https://ouuan.github.io/post/atcoder-beginner-contest-115/</guid><description>之前听教练安利，就来打了场 AtCoder。 -5h 比赛地址 一开始看到 &amp;ldquo;Beginner&amp;quot;的时候我还迟疑了一下，看了下上一场 Beginner</description></item><item><title>WC2019 全国模拟赛第二场 T1 题解</title><link>https://ouuan.github.io/post/wc2019-%E5%85%A8%E5%9B%BD%E6%A8%A1%E6%8B%9F%E8%B5%9B%E7%AC%AC%E4%BA%8C%E5%9C%BA-t1-%E9%A2%98%E8%A7%A3/</link><pubDate>Sat, 08 Dec 2018 12:04:29 +0800</pubDate><guid>https://ouuan.github.io/post/wc2019-%E5%85%A8%E5%9B%BD%E6%A8%A1%E6%8B%9F%E8%B5%9B%E7%AC%AC%E4%BA%8C%E5%9C%BA-t1-%E9%A2%98%E8%A7%A3/</guid><description>又只会写T1&amp;hellip; 题目链接 题意简述 给你一个排列 $p_{1..n}$，$a_{1..n}$ 为任意的一个排列，定义 $b[a_i]=a[</description></item><item><title>hexo博客搭建指北</title><link>https://ouuan.github.io/post/hexo%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA%E6%8C%87%E5%8C%97/</link><pubDate>Thu, 06 Dec 2018 16:00:37 +0800</pubDate><guid>https://ouuan.github.io/post/hexo%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA%E6%8C%87%E5%8C%97/</guid><description>折腾了 $3$ 天终于把博客搭建好了&amp;hellip;本文会简单介绍一下 hexo 博客的搭建，并选取一些我自己在配置博客的过程中遇到的问题，说明一下我的解决方</description></item><item><title>关于</title><link>https://ouuan.github.io/about/</link><pubDate>Wed, 05 Dec 2018 13:40:21 +0800</pubDate><guid>https://ouuan.github.io/about/</guid><description>About this blog 自 2022 年 7 月起，我已开始使用 新博客 (ouuan.moe)，本页内容已转移。 本博客所有内容保留，但不再更新，可能包含过时或错误的信息。 OI experience</description></item><item><title>WC2019 全国模拟赛第一场 T1 题解</title><link>https://ouuan.github.io/post/wc2019-%E5%85%A8%E5%9B%BD%E6%A8%A1%E6%8B%9F%E8%B5%9B%E7%AC%AC%E4%B8%80%E5%9C%BA-t1-%E9%A2%98%E8%A7%A3/</link><pubDate>Tue, 04 Dec 2018 20:29:47 +0800</pubDate><guid>https://ouuan.github.io/post/wc2019-%E5%85%A8%E5%9B%BD%E6%A8%A1%E6%8B%9F%E8%B5%9B%E7%AC%AC%E4%B8%80%E5%9C%BA-t1-%E9%A2%98%E8%A7%A3/</guid><description>由于只会T1，没法写游记，只好来写题解了&amp;hellip; 题目链接 题目大意 给你一个数列，每次可以任取两个不相交的区间，取一次的贡献是这两个区间</description></item><item><title>树上背包的上下界优化</title><link>https://ouuan.github.io/post/%E6%A0%91%E4%B8%8A%E8%83%8C%E5%8C%85%E7%9A%84%E4%B8%8A%E4%B8%8B%E7%95%8C%E4%BC%98%E5%8C%96/</link><pubDate>Wed, 28 Nov 2018 17:16:35 +0800</pubDate><guid>https://ouuan.github.io/post/%E6%A0%91%E4%B8%8A%E8%83%8C%E5%8C%85%E7%9A%84%E4%B8%8A%E4%B8%8B%E7%95%8C%E4%BC%98%E5%8C%96/</guid><description>最近做了几道树上背包的题目，很多题目的数据范围都很小，但实际上树上背包有多种方式可以优化到 $O(nm)$ （$n$ 为节点数，$m$ 为体积的值域），比如先序</description></item><item><title>浅谈邻项交换排序的应用以及需要注意的问题</title><link>https://ouuan.github.io/post/%E6%B5%85%E8%B0%88%E9%82%BB%E9%A1%B9%E4%BA%A4%E6%8D%A2%E6%8E%92%E5%BA%8F%E7%9A%84%E5%BA%94%E7%94%A8%E4%BB%A5%E5%8F%8A%E9%9C%80%E8%A6%81%E6%B3%A8%E6%84%8F%E7%9A%84%E9%97%AE%E9%A2%98/</link><pubDate>Sun, 18 Nov 2018 08:05:50 +0800</pubDate><guid>https://ouuan.github.io/post/%E6%B5%85%E8%B0%88%E9%82%BB%E9%A1%B9%E4%BA%A4%E6%8D%A2%E6%8E%92%E5%BA%8F%E7%9A%84%E5%BA%94%E7%94%A8%E4%BB%A5%E5%8F%8A%E9%9C%80%E8%A6%81%E6%B3%A8%E6%84%8F%E7%9A%84%E9%97%AE%E9%A2%98/</guid><description>浅谈邻项交换排序的应用以及需要注意的问题.pdf 邻项交换排序是一种常见的贪心算法，通过比较两个相邻元素交换前后的优劣对整个序列进行排序，从而</description></item><item><title>NOIp2018提高组游记</title><link>https://ouuan.github.io/post/noip2018%E6%8F%90%E9%AB%98%E7%BB%84%E6%B8%B8%E8%AE%B0/</link><pubDate>Sun, 11 Nov 2018 14:52:37 +0800</pubDate><guid>https://ouuan.github.io/post/noip2018%E6%8F%90%E9%AB%98%E7%BB%84%E6%B8%B8%E8%AE%B0/</guid><description>Day1 T1 积木大赛 NOIp2013D2T1&amp;hellip;..看到的时候我还以为我记错了，以为原题是一次可以随便加，这题只能加一，出考场后查了下发</description></item><item><title>二维莫队解题报告</title><link>https://ouuan.github.io/post/%E4%BA%8C%E7%BB%B4%E8%8E%AB%E9%98%9F%E8%A7%A3%E9%A2%98%E6%8A%A5%E5%91%8A/</link><pubDate>Tue, 02 Oct 2018 18:23:00 +0800</pubDate><guid>https://ouuan.github.io/post/%E4%BA%8C%E7%BB%B4%E8%8E%AB%E9%98%9F%E8%A7%A3%E9%A2%98%E6%8A%A5%E5%91%8A/</guid><description>我写的莫队教程 其实这是一道bzoj上的题（bzoj2639，貌似是权限题，反正我看不了），在YALI做模拟赛的时候遇到了. 然后在网上查到了几</description></item><item><title>2018国庆YALI集训游记</title><link>https://ouuan.github.io/post/2018%E5%9B%BD%E5%BA%86yali%E9%9B%86%E8%AE%AD%E6%B8%B8%E8%AE%B0/</link><pubDate>Mon, 01 Oct 2018 19:27:01 +0800</pubDate><guid>https://ouuan.github.io/post/2018%E5%9B%BD%E5%BA%86yali%E9%9B%86%E8%AE%AD%E6%B8%B8%E8%AE%B0/</guid><description>想了想，像之前那样简略地叙述题意和做法，根本没讲清楚，没有任何意义，还不如写写自己的感受。 感觉YALI真的是一所挺不错的学校吧。总是能有一机</description></item><item><title>莫队、带修莫队、树上莫队详解</title><link>https://ouuan.github.io/post/%E8%8E%AB%E9%98%9F%E5%B8%A6%E4%BF%AE%E8%8E%AB%E9%98%9F%E6%A0%91%E4%B8%8A%E8%8E%AB%E9%98%9F%E8%AF%A6%E8%A7%A3/</link><pubDate>Sun, 30 Sep 2018 17:19:58 +0800</pubDate><guid>https://ouuan.github.io/post/%E8%8E%AB%E9%98%9F%E5%B8%A6%E4%BF%AE%E8%8E%AB%E9%98%9F%E6%A0%91%E4%B8%8A%E8%8E%AB%E9%98%9F%E8%AF%A6%E8%A7%A3/</guid><description>这几天学习了莫队算法，试着写一篇比较详细的莫队教程吧&amp;hellip; 普通莫队 简介 莫队是一种基于分块思想的离线算法，用于解决区间问题，适用范围</description></item></channel></rss>