<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-CN">
  <title>Kalorona</title>
  <link href="https://kalorona.com/"/>
  <link rel="self" href="https://kalorona.com/feed.xml"/>
  <id>https://kalorona.com/</id>
  <updated>2023-02-20T22:04:12Z</updated>
  <author><name>Kalorona</name></author>
  <entry>
    <title>RISC-V 平台上编程（一）</title>
    <link href="https://kalorona.com/posts/2023/3013-risc-v-1/"/>
    <id>https://kalorona.com/posts/2023/3013-risc-v-1/</id>
    <published>2023-02-20T22:04:12Z</published>
    <updated>2023-02-20T22:04:12Z</updated>
    <category term="Computer Science"/>
    <summary type="html">&lt;blockquote&gt;
&lt;p&gt;RISC-V的作者们旨在提供数种可以在 &lt;a href=&quot;https://zh.wikipedia.org/wiki/BSD%E8%AE%B8%E5%8F%AF%E8%AF%81&quot;&gt;BSD 许可证&lt;/a&gt;之下自由使用的 CPU 设计；该许可证允许像是 RISC-V 芯片设计等派生作品可以像 RISC-V 本身一样是公开且自由发行，也可以是闭源或者是专有财产。&lt;/p&gt;
&lt;p&gt;RISC-V - Wikipedia&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;在过去几十年的开源软件运动中，以 GNU/Linux 等为代表的一系列开源软件成为了科技行业内不可或缺的基础设施，平等的让每一个使用开源软件的个人与团体受益。除了开源操作系统，开源运动在其他方面也并未停下过。各种软件开发框架和系统软件都在拥抱开源（比如，曾将 Linux 称为「癌症」的微软现在也积极的在开源社区中贡献）。&lt;/p&gt;</summary>
  </entry>
  <entry>
    <title>算法竞赛回忆录</title>
    <link href="https://kalorona.com/posts/2022/2956-goodbye-my-youth/"/>
    <id>https://kalorona.com/posts/2022/2956-goodbye-my-youth/</id>
    <published>2022-07-27T19:10:44Z</published>
    <updated>2022-07-27T19:10:44Z</updated>
    <category term="Things"/>
    <summary type="html">&lt;p&gt;现在是 2022 年 7 月 28 日的凌晨，我刚刚结束 CCPC Final 2021。打铁是毫无疑问的，Final 本来也就是去图一乐，但是这一场比赛对我的算法竞赛历程极为重要吧。&lt;/p&gt;
&lt;p&gt;它标志了我四年算法竞赛生涯的结束。回忆着几个小时前的比赛，我记得我还在和队友讨论 SG 函数、meet-in-middle、线性基和高斯消元。「到底是怎么实现的呢？这个思路又是怎么形成的呢？」即使我几周前就决定了我在这个赛季结束之后就退役，但是在退役的最后一场比赛，明知道自己以后可能再也不会想这些东西，却还是一直在思考着。现在我一个人坐在床上打字，仔细想想才明白，原来我已经在算法竞赛中太久了，这样的思考已经成为了我每一天的习惯了。&lt;/p&gt;</summary>
  </entry>
  <entry>
    <title>本科第一学期总结</title>
    <link href="https://kalorona.com/posts/2022/2918-undergraduate-semester-1-summary/"/>
    <id>https://kalorona.com/posts/2022/2918-undergraduate-semester-1-summary/</id>
    <published>2022-01-16T09:54:06Z</published>
    <updated>2022-01-16T09:54:06Z</updated>
    <category term="Things"/>
    <summary type="html">&lt;p&gt;上大学了，很多事情也都不一样了许多。按照惯例，写一个学期总结来说一些这个学期的状态和想法吧。&lt;/p&gt;</summary>
  </entry>
  <entry>
    <title>「2021 CCPC 桂林」J - Suffix Automaton</title>
    <link href="https://kalorona.com/posts/2021/2902-2021-ccpc-guilin-j-suffix-automaton/"/>
    <id>https://kalorona.com/posts/2021/2902-2021-ccpc-guilin-j-suffix-automaton/</id>
    <published>2021-11-15T13:26:36Z</published>
    <updated>2021-11-15T13:26:36Z</updated>
    <category term="Olympiad in Informatics"/>
    <summary type="html">&lt;p&gt;给定一个字符串 \(S\)。对该字符串本质不同的子串定义一种排序方式：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;长度不同时，长度短的排在低次位。&lt;/li&gt;
&lt;li&gt;长度相同时，按字典序排序。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;简单而言，长度是第一关键字，字典序是第二关键字。现在给定 \(Q\) 个询问，每个询问要求找到在该排序下排名为 \(k\) 的子串的第一次出现位置。&lt;/p&gt;</summary>
  </entry>
  <entry>
    <title>Codeforces Round #747 (Div. 2) - 解题报告</title>
    <link href="https://kalorona.com/posts/2021/2883-cf-1594/"/>
    <id>https://kalorona.com/posts/2021/2883-cf-1594/</id>
    <published>2021-10-11T14:10:04Z</published>
    <updated>2021-10-11T14:10:04Z</updated>
    <category term="Olympiad in Informatics"/>
    <summary type="html">&lt;p&gt;思博题，没什么好讲的。&lt;/p&gt;</summary>
  </entry>
  <entry>
    <title>VSCode 中 C/C++ 插件的配置（macOS）</title>
    <link href="https://kalorona.com/posts/2021/2855-vscode-cpptool-single-file-config/"/>
    <id>https://kalorona.com/posts/2021/2855-vscode-cpptool-single-file-config/</id>
    <published>2021-08-21T07:36:19Z</published>
    <updated>2021-08-21T07:36:19Z</updated>
    <category term="Computer Science"/>
    <summary type="html">&lt;p&gt;高考结束之后，我身边有一些计算机系的同学准备开始卷 C/C++，在使用 macOS VSCode 的过程中碰到了配置上的问题。在这里写一篇小的文章来记录一下这个过程。&lt;/p&gt;
&lt;p&gt;本文的目标是配置好 Cpptool 使得 VSCode 可以自动进行单文件的编译和调试。&lt;/p&gt;</summary>
  </entry>
  <entry>
    <title>写在高考前</title>
    <link href="https://kalorona.com/posts/2021/2813-before-ncee-2021/"/>
    <id>https://kalorona.com/posts/2021/2813-before-ncee-2021/</id>
    <published>2021-05-16T09:48:43Z</published>
    <updated>2021-05-16T09:48:43Z</updated>
    <category term="Things"/>
    <summary type="html">&lt;p&gt;「但行好事，莫问前程。」在国赛跪烂之后，每当我焦躁不安，因为考试中的低级错误和并不理想的学术成绩时，我都会有意识地深呼吸，然后默念这句话。可以说，这就是我的高三。&lt;/p&gt;</summary>
  </entry>
  <entry>
    <title>AFO</title>
    <link href="https://kalorona.com/posts/2020/2741-afo/"/>
    <id>https://kalorona.com/posts/2020/2741-afo/</id>
    <published>2020-08-20T12:26:23Z</published>
    <updated>2020-08-20T12:26:23Z</updated>
    <category term="Things"/>
    <summary type="html">&lt;p&gt;一无所有的退役了。&lt;/p&gt;</summary>
  </entry>
  <entry>
    <title>「GDOI2020模拟02.05」生成树 - 题解</title>
    <link href="https://kalorona.com/posts/2020/2731-jzoj-6461/"/>
    <id>https://kalorona.com/posts/2020/2731-jzoj-6461/</id>
    <published>2020-08-07T13:23:44Z</published>
    <updated>2020-08-07T13:23:44Z</updated>
    <category term="Olympiad in Informatics"/>
    <summary type="html">&lt;p&gt;有意思。之前做过一题是用矩阵树+高斯消元插值求本题的一维情况，本打算用继续这么做，后面发现 Lagrange 插值能做到 \(\Theta(n^5)\)，就学了一点新的东西。&lt;/p&gt;
&lt;p&gt;首先，要认识到本题矩阵树出来之后可以得到一个二元多项式：&lt;/p&gt;
&lt;p&gt;\[\sum_{i = 0}^{n - 1} \sum_{j = 0}^{n - 1} a_{i, j} x^i y^j\]&lt;/p&gt;</summary>
  </entry>
  <entry>
    <title>AtCoder Grand Contest 032 - 解题报告</title>
    <link href="https://kalorona.com/posts/2020/2726-agc-032/"/>
    <id>https://kalorona.com/posts/2020/2726-agc-032/</id>
    <published>2020-08-07T13:07:54Z</published>
    <updated>2020-08-07T13:07:54Z</updated>
    <category term="Olympiad in Informatics"/>
    <summary type="html">&lt;p&gt;这个 \(n \leq 100\)，考虑最后一次插入，然后复原出来即可。&lt;/p&gt;</summary>
  </entry>
  <entry>
    <title>Lagrange 插值</title>
    <link href="https://kalorona.com/posts/2020/2712-lagrange-interpolation/"/>
    <id>https://kalorona.com/posts/2020/2712-lagrange-interpolation/</id>
    <published>2020-08-05T13:57:13Z</published>
    <updated>2020-08-05T13:57:13Z</updated>
    <category term="Olympiad in Informatics"/>
    <summary type="html">&lt;p&gt;如果你手上有一堆散点，然后你可以用这个公式拟合出一个函数：&lt;/p&gt;
&lt;p&gt;\[f(x) = \sum_{i = 1}^n y_i \prod_{j \neq i}^n \frac{x - x_j}{x_i - x_j}\]&lt;/p&gt;</summary>
  </entry>
  <entry>
    <title>NOI 复习专题 - 数据结构</title>
    <link href="https://kalorona.com/posts/2020/2707-noi-review-data-structure/"/>
    <id>https://kalorona.com/posts/2020/2707-noi-review-data-structure/</id>
    <published>2020-08-03T12:55:03Z</published>
    <updated>2020-08-03T12:55:03Z</updated>
    <category term="Olympiad in Informatics"/>
    <summary type="html">&lt;p&gt;经典题：HDU4085&lt;/p&gt;</summary>
  </entry>
  <entry>
    <title>NOI 复习专题 - DP</title>
    <link href="https://kalorona.com/posts/2020/2701-noi-review-dp/"/>
    <id>https://kalorona.com/posts/2020/2701-noi-review-dp/</id>
    <published>2020-08-03T12:53:56Z</published>
    <updated>2020-08-03T12:53:56Z</updated>
    <category term="Olympiad in Informatics"/>
    <summary type="html">&lt;p&gt;斜率优化其实不是很难，可以理解为在平面上的一些点作为决策点，而你现在有一条斜率为 \(k\) 的直线，你需要使其经过一个合适的点，使得这条线的截距最大/最小化。这个显然可以使这些点组成一个上/下凸包、然后二分找到斜率相近的那条线段进行转移。&lt;/p&gt;</summary>
  </entry>
  <entry>
    <title>P5161:WD与数列 - 题解</title>
    <link href="https://kalorona.com/posts/2020/2695-p5161/"/>
    <id>https://kalorona.com/posts/2020/2695-p5161/</id>
    <published>2020-07-31T06:30:14Z</published>
    <updated>2020-07-31T06:30:14Z</updated>
    <category term="Olympiad in Informatics"/>
    <summary type="html">&lt;p&gt;先差分，然后再来做这个不相交子串匹配的问题。&lt;/p&gt;
&lt;p&gt;我们可以考虑用线段树来维护 endpos 集合，然后用启发式合并的方式来计算一个后缀点与当前点集之间产生的贡献。有两种情况：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;当前为 endpos 的最长长度、与当前位置 \(x\) 不相交的子串。这个可以直接暴力线段树上查个数。&lt;/li&gt;
&lt;li&gt;长度小于 \(maxdep\)，以 \(endpos\) 在左边的情况为例：答案的贡献就是 \(x - endpos - 1\)。&lt;/li&gt;
&lt;/ul&gt;</summary>
  </entry>
  <entry>
    <title>「Codeforces 724F」Uniformly Branched Trees - 题解</title>
    <link href="https://kalorona.com/posts/2020/2693-cf-742f/"/>
    <id>https://kalorona.com/posts/2020/2693-cf-742f/</id>
    <published>2020-07-30T13:03:19Z</published>
    <updated>2020-07-30T13:03:19Z</updated>
    <category term="Olympiad in Informatics"/>
    <summary type="html">&lt;p&gt;啊，又是无根树 DP。首先讨论奇偶性，如果是奇数的话可以直接 DP；如果不是，则需要容斥一波。&lt;/p&gt;
&lt;p&gt;设置状态 \(dp[scale][maxPart][degree]\)，意为大小为 \(scale\)、最大子树大小为 \(maxPart\) 且根度数为 \(degree\) 的方案树。转移其实很好想，看代码吧。&lt;/p&gt;</summary>
  </entry>
  <entry>
    <title>「Codeforces 566C」Logistical Questions - 题解</title>
    <link href="https://kalorona.com/posts/2020/2688-cf-566c/"/>
    <id>https://kalorona.com/posts/2020/2688-cf-566c/</id>
    <published>2020-07-30T12:39:06Z</published>
    <updated>2020-07-30T12:39:06Z</updated>
    <category term="Olympiad in Informatics"/>
    <summary type="html">&lt;p&gt;这个题很神仙啊。首先考虑这个函数是一个单峰函数，且最后多个点所构成的代价函数一定形如 \(y = ax^{\frac{3}{2}} + b\)，显然这个函数也是单峰的。所以，当树的形态为一条链时，我们可以尝试二分。如果进化成一颗树，我们可以考虑进行点分治，考虑当前与根连接的子树里，只有一个以下的子树是更优的。&lt;/p&gt;</summary>
  </entry>
  <entry>
    <title>「Codeforces 526F」Pudding Monsters - 题解</title>
    <link href="https://kalorona.com/posts/2020/2685-cf-526f/"/>
    <id>https://kalorona.com/posts/2020/2685-cf-526f/</id>
    <published>2020-07-30T12:18:02Z</published>
    <updated>2020-07-30T12:18:02Z</updated>
    <category term="Olympiad in Informatics"/>
    <summary type="html">&lt;p&gt;这个题转换一下就是：给你一个排列，然后算有多少个区间使得区间内的数可以构成一个连续的数列。&lt;/p&gt;</summary>
  </entry>
  <entry>
    <title>「Codeforces 341D」Iahub and Xors - 题解</title>
    <link href="https://kalorona.com/posts/2020/2681-cf-341d/"/>
    <id>https://kalorona.com/posts/2020/2681-cf-341d/</id>
    <published>2020-07-30T11:49:46Z</published>
    <updated>2020-07-30T11:49:46Z</updated>
    <category term="Olympiad in Informatics"/>
    <summary type="html">&lt;p&gt;首先看到这个题可以考虑树套树，&lt;s&gt;然后就做完了。&lt;/s&gt;&lt;/p&gt;
&lt;p&gt;我们考虑用二维树状数组进行差分。当然，如果按正常的想法差分的话，我们只能想到用前缀和维护单点值，而不是维护区间异或和。我们设差分后的结果：&lt;/p&gt;
&lt;p&gt;\[d_{i, j} = a_{i, j} \oplus a_{i - 1, j} \oplus a_{i, j - 1} \oplus a_{i - 1, j - 1}\]&lt;/p&gt;</summary>
  </entry>
  <entry>
    <title>AtCoder Grand Contest 033 - 解题报告</title>
    <link href="https://kalorona.com/posts/2020/2660-agc-033/"/>
    <id>https://kalorona.com/posts/2020/2660-agc-033/</id>
    <published>2020-07-24T11:54:24Z</published>
    <updated>2020-07-24T11:54:24Z</updated>
    <category term="Olympiad in Informatics"/>
    <summary type="html">&lt;p&gt;一眼题，直接 BFS 找最长最短路即可。&lt;/p&gt;</summary>
  </entry>
  <entry>
    <title>虚树</title>
    <link href="https://kalorona.com/posts/2020/2657-virtual-tree/"/>
    <id>https://kalorona.com/posts/2020/2657-virtual-tree/</id>
    <published>2020-07-23T06:36:45Z</published>
    <updated>2020-07-23T06:36:45Z</updated>
    <category term="Olympiad in Informatics"/>
    <summary type="html">&lt;p&gt;在一棵树上对关键点集进行运算的一种灵活的数据结构。&lt;/p&gt;</summary>
  </entry>
</feed>
