<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>ByteCraft</title><description>AI 教育 · 竞赛教学 · 技术探索</description><link>https://blog.singlelyra.top/</link><language>zh_CN</language><item><title>Vibe Coding 实践：用 AI 30 分钟搭建个人博客</title><link>https://blog.singlelyra.top/posts/ai-coding-vibe-blog/</link><guid isPermaLink="true">https://blog.singlelyra.top/posts/ai-coding-vibe-blog/</guid><description>记录一次完整的 Vibe Coding 实践——如何用 AI 工具在 30 分钟内从零搭建一个功能完整的个人博客。</description><pubDate>Sun, 22 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;什么是 Vibe Coding？&lt;/h2&gt;
&lt;p&gt;Vibe Coding 是一种全新的编程范式：&lt;strong&gt;你描述意图，AI 来实现代码&lt;/strong&gt;。&lt;/p&gt;
&lt;p&gt;与传统编程不同，Vibe Coding 强调：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;🎯 &lt;strong&gt;意图驱动&lt;/strong&gt;：用自然语言描述需求&lt;/li&gt;
&lt;li&gt;🤖 &lt;strong&gt;AI 协作&lt;/strong&gt;：让 AI 处理实现细节&lt;/li&gt;
&lt;li&gt;⚡ &lt;strong&gt;快速迭代&lt;/strong&gt;：通过对话快速调整&lt;/li&gt;
&lt;li&gt;🔄 &lt;strong&gt;持续优化&lt;/strong&gt;：逐步完善结果&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;实践过程&lt;/h2&gt;
&lt;h3&gt;Step 1：描述需求（5 分钟）&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;我想创建一个个人博客，使用 Astro 框架 + Fuwari 主题。
需要以下功能：
1. 博客文章列表
2. 标签和分类系统
3. 深浅色主题切换
4. 代码高亮
5. 数学公式支持
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Step 2：项目初始化（5 分钟）&lt;/h3&gt;
&lt;p&gt;AI 帮我完成了：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;克隆 Fuwari 主题&lt;/li&gt;
&lt;li&gt;修改配置文件&lt;/li&gt;
&lt;li&gt;设置中文语言&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Step 3：内容定制（10 分钟）&lt;/h3&gt;
&lt;p&gt;通过与 AI 对话，逐步完善：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;导航栏结构&lt;/li&gt;
&lt;li&gt;首页布局&lt;/li&gt;
&lt;li&gt;分类体系设计&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Step 4：内容创建（10 分钟）&lt;/h3&gt;
&lt;p&gt;AI 辅助生成了：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;示例文章&lt;/li&gt;
&lt;li&gt;About 页面&lt;/li&gt;
&lt;li&gt;使用说明&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Prompt 技巧&lt;/h2&gt;
&lt;p&gt;在 Vibe Coding 中，好的 Prompt 是关键：&lt;/p&gt;
&lt;h3&gt;✅ 好的 Prompt&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;请帮我创建一个教学专区页面，需求如下：
- 展示 category 为 &quot;teaching&quot; 的文章
- 支持按难度（入门/基础/进阶/高级）筛选
- 页面顶部有简介区域
- 保持 Fuwari 主题的设计风格
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;❌ 不好的 Prompt&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;帮我做一个页面
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;关键原则&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;具体化&lt;/strong&gt;：明确说明要什么&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;上下文&lt;/strong&gt;：提供必要的背景信息&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;约束&lt;/strong&gt;：说明限制条件&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;示例&lt;/strong&gt;：给出参考案例&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;工具推荐&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;工具&lt;/th&gt;
&lt;th&gt;用途&lt;/th&gt;
&lt;th&gt;推荐度&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GitHub Copilot&lt;/td&gt;
&lt;td&gt;代码补全 &amp;amp; Agent&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐⭐&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cursor&lt;/td&gt;
&lt;td&gt;AI IDE&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐⭐&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ChatGPT&lt;/td&gt;
&lt;td&gt;需求分析 &amp;amp; 设计&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude&lt;/td&gt;
&lt;td&gt;长文档处理&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;v0.dev&lt;/td&gt;
&lt;td&gt;UI 设计&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;总结&lt;/h2&gt;
&lt;p&gt;Vibe Coding 不是要取代编程能力，而是要&lt;strong&gt;放大你的生产力&lt;/strong&gt;。了解基础编程知识 + 掌握与 AI 对话的技巧 = 10x 效率。&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[!IMPORTANT]
Vibe Coding 的核心不是 &quot;不学编程&quot;，而是 &quot;学会和 AI 协作&quot;。&lt;/p&gt;
&lt;/blockquote&gt;
</content:encoded></item><item><title>使用 Astro 搭建个人博客</title><link>https://blog.singlelyra.top/posts/blog-astro-setup/</link><guid isPermaLink="true">https://blog.singlelyra.top/posts/blog-astro-setup/</guid><description>记录使用 Astro + Fuwari 主题搭建个人博客的完整过程，包括主题定制、功能扩展和部署上线。</description><pubDate>Fri, 20 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;为什么选择 Astro？&lt;/h2&gt;
&lt;p&gt;Astro 是一个现代化的静态网站生成器，具有以下优势：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;零 JS 默认&lt;/strong&gt; —— 只在需要时加载 JavaScript&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;框架无关&lt;/strong&gt; —— 支持 React、Vue、Svelte 等&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;内容优先&lt;/strong&gt; —— 原生 Markdown 和 MDX 支持&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;极快的构建&lt;/strong&gt; —— 基于 Vite 构建&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;安装与配置&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;# 克隆 Fuwari 主题
git clone https://github.com/saicaca/fuwari.git my-blog
cd my-blog

# 安装依赖
pnpm install

# 启动开发服务器
pnpm dev
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;项目结构&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;src/
├── config.ts          # 站点配置
├── content/
│   └── posts/         # 博客文章
├── pages/             # 页面路由
├── components/        # UI 组件
└── styles/            # 样式文件
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;数学公式支持&lt;/h2&gt;
&lt;p&gt;本站支持 $\LaTeX$ 数学公式，例如：&lt;/p&gt;
&lt;p&gt;行内公式：$E = mc^2$&lt;/p&gt;
&lt;p&gt;块级公式：&lt;/p&gt;
&lt;p&gt;$$
\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
$$&lt;/p&gt;
&lt;h2&gt;代码高亮&lt;/h2&gt;
&lt;p&gt;支持多种语言的代码高亮：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;def fibonacci(n: int) -&amp;gt; int:
    &quot;&quot;&quot;计算斐波那契数列第 n 项&quot;&quot;&quot;
    if n &amp;lt;= 1:
        return n
    return fibonacci(n - 1) + fibonacci(n - 2)

# 动态规划优化
def fibonacci_dp(n: int) -&amp;gt; int:
    dp = [0, 1]
    for i in range(2, n + 1):
        dp.append(dp[-1] + dp[-2])
    return dp[n]
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;下一步计划&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;[x] 基础主题搭建&lt;/li&gt;
&lt;li&gt;[x] 自定义导航&lt;/li&gt;
&lt;li&gt;[x] 内容分类系统&lt;/li&gt;
&lt;li&gt;[ ] 评论系统接入&lt;/li&gt;
&lt;li&gt;[ ] 图片优化&lt;/li&gt;
&lt;li&gt;[ ] SEO 优化&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;[!TIP]
Fuwari 主题支持 GitHub 风格的 Admonition 语法！&lt;/p&gt;
&lt;/blockquote&gt;
</content:encoded></item><item><title>动态规划入门：从零开始理解 DP</title><link>https://blog.singlelyra.top/posts/teaching-dp-intro/</link><guid isPermaLink="true">https://blog.singlelyra.top/posts/teaching-dp-intro/</guid><description>面向信息学竞赛初学者的动态规划入门教程，通过经典例题讲解 DP 的核心思想。</description><pubDate>Wed, 18 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;什么是动态规划？&lt;/h2&gt;
&lt;p&gt;动态规划（Dynamic Programming，简称 DP）是一种通过&lt;strong&gt;把原问题分解为相对简单的子问题&lt;/strong&gt;来求解复杂问题的方法。&lt;/p&gt;
&lt;h3&gt;核心思想&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;最优子结构&lt;/strong&gt;：问题的最优解包含子问题的最优解&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;重叠子问题&lt;/strong&gt;：不同的子问题有相同的子子问题&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;状态转移&lt;/strong&gt;：从已知状态推导未知状态&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;经典例题：爬楼梯&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;你需要爬 $n$ 阶楼梯，每次可以爬 1 阶或 2 阶。问有多少种不同的方法？&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;分析&lt;/h3&gt;
&lt;p&gt;设 $f(n)$ 表示爬到第 $n$ 阶的方法数：&lt;/p&gt;
&lt;p&gt;$$
f(n) = \begin{cases}
1 &amp;amp; n = 1 \
2 &amp;amp; n = 2 \
f(n-1) + f(n-2) &amp;amp; n &amp;gt; 2
\end{cases}
$$&lt;/p&gt;
&lt;h3&gt;C++ 实现&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;#include &amp;lt;iostream&amp;gt;
using namespace std;

int main() {
    int n;
    cin &amp;gt;&amp;gt; n;

    // dp[i] 表示爬到第 i 阶的方法数
    int dp[n + 1];
    dp[1] = 1;
    dp[2] = 2;

    for (int i = 3; i &amp;lt;= n; i++) {
        dp[i] = dp[i - 1] + dp[i - 2];
    }

    cout &amp;lt;&amp;lt; dp[n] &amp;lt;&amp;lt; endl;
    return 0;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;经典例题：01 背包问题&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;有 $n$ 个物品，第 $i$ 个物品重量为 $w_i$，价值为 $v_i$。背包容量为 $W$。求在不超过背包容量的前提下，能获得的最大价值。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;状态定义&lt;/h3&gt;
&lt;p&gt;$dp[i][j]$ 表示考虑前 $i$ 个物品、背包容量为 $j$ 时的最大价值。&lt;/p&gt;
&lt;h3&gt;状态转移方程&lt;/h3&gt;
&lt;p&gt;$$
dp[i][j] = \max(dp[i-1][j], ; dp[i-1][j-w_i] + v_i)
$$&lt;/p&gt;
&lt;h3&gt;C++ 实现&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;#include &amp;lt;iostream&amp;gt;
#include &amp;lt;algorithm&amp;gt;
using namespace std;

const int MAXN = 1005;
int dp[MAXN];
int w[MAXN], v[MAXN];

int main() {
    int n, W;
    cin &amp;gt;&amp;gt; n &amp;gt;&amp;gt; W;

    for (int i = 1; i &amp;lt;= n; i++) {
        cin &amp;gt;&amp;gt; w[i] &amp;gt;&amp;gt; v[i];
    }

    // 一维优化
    for (int i = 1; i &amp;lt;= n; i++) {
        for (int j = W; j &amp;gt;= w[i]; j--) {
            dp[j] = max(dp[j], dp[j - w[i]] + v[i]);
        }
    }

    cout &amp;lt;&amp;lt; dp[W] &amp;lt;&amp;lt; endl;
    return 0;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;[!NOTE]
注意一维优化时，内层循环需要&lt;strong&gt;倒序遍历&lt;/strong&gt;，以保证每个物品只被选一次。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;练习题&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://www.luogu.com.cn/problem/P1048&quot;&gt;洛谷 P1048 采药&lt;/a&gt; - 01 背包模板&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.luogu.com.cn/problem/P1616&quot;&gt;洛谷 P1616 疯狂的采药&lt;/a&gt; - 完全背包&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.luogu.com.cn/problem/P1049&quot;&gt;洛谷 P1049 装箱问题&lt;/a&gt; - 01 背包变形&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;总结&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;问题类型&lt;/th&gt;
&lt;th&gt;状态定义&lt;/th&gt;
&lt;th&gt;转移方程&lt;/th&gt;
&lt;th&gt;时间复杂度&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;爬楼梯&lt;/td&gt;
&lt;td&gt;$f(n)$：方法数&lt;/td&gt;
&lt;td&gt;$f(n) = f(n-1) + f(n-2)$&lt;/td&gt;
&lt;td&gt;$O(n)$&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;01 背包&lt;/td&gt;
&lt;td&gt;$dp[i][j]$：前 $i$ 件、容量 $j$ 的最大价值&lt;/td&gt;
&lt;td&gt;$dp[i][j] = \max(dp[i-1][j], dp[i-1][j-w_i]+v_i)$&lt;/td&gt;
&lt;td&gt;$O(nW)$&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;[!TIP]
DP 学习建议：先理解状态定义，再推导转移方程，最后考虑优化。&lt;/p&gt;
&lt;/blockquote&gt;
</content:encoded></item><item><title>Canvas 粒子动画效果</title><link>https://blog.singlelyra.top/posts/demo-canvas-particles/</link><guid isPermaLink="true">https://blog.singlelyra.top/posts/demo-canvas-particles/</guid><description>使用 HTML5 Canvas 和 JavaScript 实现炫酷的粒子连线动画效果。</description><pubDate>Mon, 16 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;效果说明&lt;/h2&gt;
&lt;p&gt;本 Demo 实现了一个交谈粒子动画效果：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;🎨 随机颜色粒子在画布上运动&lt;/li&gt;
&lt;li&gt;🔗 距离较近的粒子之间自动连线&lt;/li&gt;
&lt;li&gt;🖱️ 鼠标移动时粒子会被吸引&lt;/li&gt;
&lt;li&gt;📱 自适应屏幕尺寸&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;核心代码&lt;/h2&gt;
&lt;h3&gt;HTML 结构&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;style&amp;gt;
        body { margin: 0; overflow: hidden; }
        canvas { display: block; background: #0a0a2e; }
    &amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;canvas id=&quot;particles&quot;&amp;gt;&amp;lt;/canvas&amp;gt;
    &amp;lt;script src=&quot;particles.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;JavaScript 实现&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;const canvas = document.getElementById(&apos;particles&apos;);
const ctx = canvas.getContext(&apos;2d&apos;);

canvas.width = window.innerWidth;
canvas.height = window.innerHeight;

class Particle {
    constructor() {
        this.x = Math.random() * canvas.width;
        this.y = Math.random() * canvas.height;
        this.vx = (Math.random() - 0.5) * 2;
        this.vy = (Math.random() - 0.5) * 2;
        this.radius = Math.random() * 3 + 1;
    }

    update() {
        this.x += this.vx;
        this.y += this.vy;

        // 边界反弹
        if (this.x &amp;lt; 0 || this.x &amp;gt; canvas.width) this.vx *= -1;
        if (this.y &amp;lt; 0 || this.y &amp;gt; canvas.height) this.vy *= -1;
    }

    draw() {
        ctx.beginPath();
        ctx.arc(this.x, this.y, this.radius, 0, Math.PI * 2);
        ctx.fillStyle = &apos;rgba(255, 255, 255, 0.8)&apos;;
        ctx.fill();
    }
}

// 创建粒子
const particles = Array.from({ length: 100 }, () =&amp;gt; new Particle());

function connectParticles() {
    for (let i = 0; i &amp;lt; particles.length; i++) {
        for (let j = i + 1; j &amp;lt; particles.length; j++) {
            const dx = particles[i].x - particles[j].x;
            const dy = particles[i].y - particles[j].y;
            const dist = Math.sqrt(dx * dx + dy * dy);

            if (dist &amp;lt; 150) {
                ctx.beginPath();
                ctx.strokeStyle = `rgba(255,255,255,${1 - dist / 150})`;
                ctx.lineWidth = 0.5;
                ctx.moveTo(particles[i].x, particles[i].y);
                ctx.lineTo(particles[j].x, particles[j].y);
                ctx.stroke();
            }
        }
    }
}

function animate() {
    ctx.clearRect(0, 0, canvas.width, canvas.height);
    particles.forEach(p =&amp;gt; {
        p.update();
        p.draw();
    });
    connectParticles();
    requestAnimationFrame(animate);
}

animate();
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;技术要点&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Canvas 2D 绑定&lt;/strong&gt; —— 使用 &lt;code&gt;getContext(&apos;2d&apos;)&lt;/code&gt; 获取绑定上下文&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;粒子系统&lt;/strong&gt; —— 面向对象管理每个粒子的位置和速度&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;连线算法&lt;/strong&gt; —— 双重循环计算距离，距离阈值内绘制连线&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;动画循环&lt;/strong&gt; —— &lt;code&gt;requestAnimationFrame&lt;/code&gt; 实现 60fps 动画&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;[!NOTE]
粒子数量和连线距离可以根据设备性能调整，移动端建议减少粒子数量。&lt;/p&gt;
&lt;/blockquote&gt;
</content:encoded></item><item><title>2026 年学习计划与技术展望</title><link>https://blog.singlelyra.top/posts/blog-2026-plan/</link><guid isPermaLink="true">https://blog.singlelyra.top/posts/blog-2026-plan/</guid><description>新一年的学习计划，包括 AI 工具链、竞赛教学和 Web 开发三个方向的规划。</description><pubDate>Sun, 15 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;回顾 2025&lt;/h2&gt;
&lt;p&gt;过去一年，我在以下几个方面有了显著的成长：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;完成了信息学竞赛入门课程的系统化整理&lt;/li&gt;
&lt;li&gt;深入实践了 AI Coding 工作流&lt;/li&gt;
&lt;li&gt;搭建了这个个人网站&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;2026 年规划&lt;/h2&gt;
&lt;h3&gt;📚 教学方向&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;完善信息学竞赛教学体系，覆盖 NOIP 考纲&lt;/li&gt;
&lt;li&gt;开发面向初学者的 Python 入门课程&lt;/li&gt;
&lt;li&gt;录制算法讲解视频&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;🤖 AI &amp;amp; Coding&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;深入研究 Agent 工作流&lt;/li&gt;
&lt;li&gt;探索 AI 辅助教学的应用场景&lt;/li&gt;
&lt;li&gt;实践更多 Vibe Coding 项目&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;💻 技术学习&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;系统学习 TypeScript&lt;/li&gt;
&lt;li&gt;深入 Astro 生态&lt;/li&gt;
&lt;li&gt;了解 Rust 基础&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;时间分配&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;方向&lt;/th&gt;
&lt;th&gt;每周时间&lt;/th&gt;
&lt;th&gt;优先级&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;竞赛教学&lt;/td&gt;
&lt;td&gt;10h&lt;/td&gt;
&lt;td&gt;⭐⭐⭐&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI Coding&lt;/td&gt;
&lt;td&gt;8h&lt;/td&gt;
&lt;td&gt;⭐⭐⭐&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Web 开发&lt;/td&gt;
&lt;td&gt;5h&lt;/td&gt;
&lt;td&gt;⭐⭐&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;阅读 &amp;amp; 写作&lt;/td&gt;
&lt;td&gt;3h&lt;/td&gt;
&lt;td&gt;⭐⭐&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;保持好奇心，持续学习，做最好的自己。&lt;/p&gt;
&lt;/blockquote&gt;
</content:encoded></item><item><title>Prompt Engineering 基础指南</title><link>https://blog.singlelyra.top/posts/ai-coding-prompt-guide/</link><guid isPermaLink="true">https://blog.singlelyra.top/posts/ai-coding-prompt-guide/</guid><description>面向开发者的 Prompt Engineering 入门指南，掌握与 AI 高效对话的核心技巧。</description><pubDate>Thu, 12 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;为什么需要学习 Prompt Engineering？&lt;/h2&gt;
&lt;p&gt;随着 AI 编程工具的普及，&lt;strong&gt;如何与 AI 高效交流&lt;/strong&gt;已经成为一项核心技能。&lt;/p&gt;
&lt;p&gt;好的 Prompt 可以让你：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;获得更准确的代码输出&lt;/li&gt;
&lt;li&gt;减少来回修改的次数&lt;/li&gt;
&lt;li&gt;解决更复杂的问题&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;核心原则&lt;/h2&gt;
&lt;h3&gt;1. 清晰具体（Be Specific）&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;❌ &quot;帮我写一个排序&quot;
✅ &quot;用 C++ 实现快速排序，输入一个整数数组，输出排序后的结果，要求原地排序&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;2. 提供上下文（Give Context）&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;❌ &quot;这段代码有 bug，帮我修&quot;
✅ &quot;这段 C++ 代码在处理空数组时会段错误，请帮我添加边界检查：
[粘贴代码]&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;3. 分步骤思考（Chain of Thought）&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;请帮我实现一个 LRU Cache，按照以下步骤：
1. 先定义数据结构
2. 实现 get 操作
3. 实现 put 操作
4. 分析时间复杂度
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;4. 给出示例（Few-shot）&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;请按照以下格式生成题解：

## 题目
[题目描述]

## 思路
[分析过程]

## 代码
[C++ 代码]

## 复杂度
- 时间：O(?)
- 空间：O(?)
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;实用 Prompt 模板&lt;/h2&gt;
&lt;h3&gt;代码生成&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;请用 [语言] 实现 [功能]。
要求：
- [约束1]
- [约束2]
请附带注释和使用示例。
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;代码审查&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;请审查以下代码：
[代码]

关注以下方面：
1. 正确性
2. 性能
3. 可读性
4. 边界情况
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Bug 修复&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;以下代码在 [场景] 下会出现 [问题]。
预期行为：[描述]
实际行为：[描述]
[代码]
请找出问题并修复。
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;进阶技巧&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;角色设定&lt;/strong&gt;：让 AI 扮演特定角色（&quot;你是一位资深的竞赛教练&quot;）&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;思维链&lt;/strong&gt;：要求 AI 展示推理过程&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;自我检查&lt;/strong&gt;：让 AI 审查自己的输出&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;迭代优化&lt;/strong&gt;：逐步完善，而不是一步到位&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;[!TIP]
记住：Prompt Engineering 是一门实践技能，多练多总结！&lt;/p&gt;
&lt;/blockquote&gt;
</content:encoded></item><item><title>C++ STL 常用容器速查</title><link>https://blog.singlelyra.top/posts/teaching-cpp-stl/</link><guid isPermaLink="true">https://blog.singlelyra.top/posts/teaching-cpp-stl/</guid><description>信息学竞赛中常用的 C++ STL 容器总结，包括 vector、map、set、queue、stack 等的用法。</description><pubDate>Tue, 10 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;什么是 STL？&lt;/h2&gt;
&lt;p&gt;STL（Standard Template Library）是 C++ 标准模板库，提供了丰富的数据结构和算法。&lt;/p&gt;
&lt;p&gt;在信息学竞赛中，熟练使用 STL 可以大幅提高编码效率。&lt;/p&gt;
&lt;h2&gt;常用容器&lt;/h2&gt;
&lt;h3&gt;1. vector —— 动态数组&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;#include &amp;lt;vector&amp;gt;
using namespace std;

vector&amp;lt;int&amp;gt; v;           // 声明
v.push_back(1);          // 尾部插入
v.pop_back();            // 尾部删除
v.size();                // 元素个数
v[0];                    // 随机访问
v.clear();               // 清空

// 遍历
for (int x : v) {
    cout &amp;lt;&amp;lt; x &amp;lt;&amp;lt; &quot; &quot;;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;2. map —— 有序映射&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;#include &amp;lt;map&amp;gt;
using namespace std;

map&amp;lt;string, int&amp;gt; mp;
mp[&quot;hello&quot;] = 1;        // 插入/修改
mp.count(&quot;hello&quot;);      // 查询是否存在
mp.erase(&quot;hello&quot;);      // 删除

// 遍历
for (auto&amp;amp; [key, val] : mp) {
    cout &amp;lt;&amp;lt; key &amp;lt;&amp;lt; &quot;: &quot; &amp;lt;&amp;lt; val &amp;lt;&amp;lt; endl;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;3. set —— 有序集合&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;#include &amp;lt;set&amp;gt;
using namespace std;

set&amp;lt;int&amp;gt; s;
s.insert(3);             // 插入
s.erase(3);              // 删除
s.count(3);              // 是否存在（0 或 1）
s.lower_bound(3);        // &amp;gt;= 3 的第一个元素
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;4. queue —— 队列（BFS 必备）&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;#include &amp;lt;queue&amp;gt;
using namespace std;

queue&amp;lt;int&amp;gt; q;
q.push(1);               // 入队
q.front();               // 队首
q.pop();                 // 出队
q.empty();               // 是否为空
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;5. priority_queue —— 优先队列&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;#include &amp;lt;queue&amp;gt;
using namespace std;

// 大根堆（默认）
priority_queue&amp;lt;int&amp;gt; pq;

// 小根堆
priority_queue&amp;lt;int, vector&amp;lt;int&amp;gt;, greater&amp;lt;int&amp;gt;&amp;gt; pq_min;

pq.push(3);
pq.top();                // 堆顶
pq.pop();                // 弹出堆顶
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;6. stack —— 栈&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;#include &amp;lt;stack&amp;gt;
using namespace std;

stack&amp;lt;int&amp;gt; st;
st.push(1);              // 入栈
st.top();                // 栈顶
st.pop();                // 出栈
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;速查表&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;容器&lt;/th&gt;
&lt;th&gt;头文件&lt;/th&gt;
&lt;th&gt;插入&lt;/th&gt;
&lt;th&gt;查询&lt;/th&gt;
&lt;th&gt;删除&lt;/th&gt;
&lt;th&gt;特点&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;vector&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;lt;vector&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;$O(1)$ 均摊&lt;/td&gt;
&lt;td&gt;$O(1)$&lt;/td&gt;
&lt;td&gt;$O(n)$&lt;/td&gt;
&lt;td&gt;动态数组&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;map&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;lt;map&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;$O(\log n)$&lt;/td&gt;
&lt;td&gt;$O(\log n)$&lt;/td&gt;
&lt;td&gt;$O(\log n)$&lt;/td&gt;
&lt;td&gt;有序键值对&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;unordered_map&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;lt;unordered_map&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;$O(1)$ 均摊&lt;/td&gt;
&lt;td&gt;$O(1)$ 均摊&lt;/td&gt;
&lt;td&gt;$O(1)$ 均摊&lt;/td&gt;
&lt;td&gt;哈希映射&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;set&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;lt;set&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;$O(\log n)$&lt;/td&gt;
&lt;td&gt;$O(\log n)$&lt;/td&gt;
&lt;td&gt;$O(\log n)$&lt;/td&gt;
&lt;td&gt;有序集合&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;queue&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;lt;queue&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;$O(1)$&lt;/td&gt;
&lt;td&gt;$O(1)$&lt;/td&gt;
&lt;td&gt;$O(1)$&lt;/td&gt;
&lt;td&gt;FIFO&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;stack&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;lt;stack&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;$O(1)$&lt;/td&gt;
&lt;td&gt;$O(1)$&lt;/td&gt;
&lt;td&gt;$O(1)$&lt;/td&gt;
&lt;td&gt;LIFO&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;priority_queue&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;lt;queue&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;$O(\log n)$&lt;/td&gt;
&lt;td&gt;$O(1)$&lt;/td&gt;
&lt;td&gt;$O(\log n)$&lt;/td&gt;
&lt;td&gt;堆&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;[!TIP]
竞赛中如果不需要有序性，优先使用 &lt;code&gt;unordered_map&lt;/code&gt; 和 &lt;code&gt;unordered_set&lt;/code&gt;，时间复杂度更优。&lt;/p&gt;
&lt;/blockquote&gt;
</content:encoded></item><item><title>CSS 文字打字机效果</title><link>https://blog.singlelyra.top/posts/demo-css-typewriter/</link><guid isPermaLink="true">https://blog.singlelyra.top/posts/demo-css-typewriter/</guid><description>纯 CSS 实现的打字机效果，无需 JavaScript，适合用于个人主页标题。</description><pubDate>Sun, 08 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;效果说明&lt;/h2&gt;
&lt;p&gt;使用纯 CSS 实现的打字机效果：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;⌨️ 模拟逐字打出的动画&lt;/li&gt;
&lt;li&gt;✏️ 闪烁的光标效果&lt;/li&gt;
&lt;li&gt;🎨 可自定义颜色和速度&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;完整代码&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;style&amp;gt;
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #1a1a2e;
    font-family: &apos;Courier New&apos;, monospace;
}

.typewriter h1 {
    color: #e2e8f0;
    font-size: 2rem;
    overflow: hidden;
    border-right: 3px solid #63b3ed;
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: 0.1em;
    animation:
        typing 3.5s steps(30, end),
        blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #63b3ed }
}
&amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;div class=&quot;typewriter&quot;&amp;gt;
        &amp;lt;h1&amp;gt;Hello, I&apos;m a developer.&amp;lt;/h1&amp;gt;
    &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;原理解析&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;overflow: hidden&lt;/code&gt; + &lt;code&gt;white-space: nowrap&lt;/code&gt; 让文字不换行且超出隐藏&lt;/li&gt;
&lt;li&gt;&lt;code&gt;typing&lt;/code&gt; 动画通过改变 &lt;code&gt;width&lt;/code&gt; 从 0 到 100%&lt;/li&gt;
&lt;li&gt;&lt;code&gt;steps(30, end)&lt;/code&gt; 让动画分步进行，模拟打字效果&lt;/li&gt;
&lt;li&gt;&lt;code&gt;blink-caret&lt;/code&gt; 让右边框闪烁，模拟光标&lt;/li&gt;
&lt;/ol&gt;
</content:encoded></item><item><title>信息学竞赛入门讲义 - 第一章</title><link>https://blog.singlelyra.top/posts/resource-oi-lecture-ch1/</link><guid isPermaLink="true">https://blog.singlelyra.top/posts/resource-oi-lecture-ch1/</guid><description>信息学竞赛 C++ 入门讲义，涵盖基本语法、输入输出和简单算法。适合零基础高中生。</description><pubDate>Thu, 05 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;讲义概要&lt;/h2&gt;
&lt;p&gt;本讲义为信息学竞赛入门系列第一章，主要内容包括：&lt;/p&gt;
&lt;h3&gt;目录&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;C++ 基础语法&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;变量与数据类型&lt;/li&gt;
&lt;li&gt;运算符&lt;/li&gt;
&lt;li&gt;条件语句 (if/else)&lt;/li&gt;
&lt;li&gt;循环语句 (for/while)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;输入输出&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;cin/cout 基础用法&lt;/li&gt;
&lt;li&gt;格式化输出&lt;/li&gt;
&lt;li&gt;快速读入技巧&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;简单算法&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;求最大/最小值&lt;/li&gt;
&lt;li&gt;累加/累乘&lt;/li&gt;
&lt;li&gt;简单排序&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;适用对象&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;零基础高中学生&lt;/li&gt;
&lt;li&gt;对编程感兴趣的初中生&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;配套资源&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;练习题（20 道）&lt;/li&gt;
&lt;li&gt;参考代码&lt;/li&gt;
&lt;li&gt;课后作业&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;[!NOTE]
本讲义持续更新中，建议配合 &lt;a href=&quot;/posts/teaching-cpp-stl/&quot;&gt;C++ STL 速查&lt;/a&gt; 一起学习。&lt;/p&gt;
&lt;/blockquote&gt;
</content:encoded></item><item><title>算法竞赛常用代码模板</title><link>https://blog.singlelyra.top/posts/resource-code-templates/</link><guid isPermaLink="true">https://blog.singlelyra.top/posts/resource-code-templates/</guid><description>收集整理的信息学竞赛常用代码模板，包括排序、搜索、图论、数据结构等。</description><pubDate>Sun, 01 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;模板列表&lt;/h2&gt;
&lt;p&gt;本代码模板集包含以下内容：&lt;/p&gt;
&lt;h3&gt;基础算法&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;快速排序&lt;/li&gt;
&lt;li&gt;归并排序&lt;/li&gt;
&lt;li&gt;二分查找&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;搜索&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;DFS 模板&lt;/li&gt;
&lt;li&gt;BFS 模板&lt;/li&gt;
&lt;li&gt;回溯法&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;图论&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Dijkstra 最短路&lt;/li&gt;
&lt;li&gt;Floyd 全源最短路&lt;/li&gt;
&lt;li&gt;Kruskal 最小生成树&lt;/li&gt;
&lt;li&gt;拓扑排序&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;数据结构&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;并查集&lt;/li&gt;
&lt;li&gt;线段树&lt;/li&gt;
&lt;li&gt;树状数组&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;数学&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;快速幂&lt;/li&gt;
&lt;li&gt;GCD / LCM&lt;/li&gt;
&lt;li&gt;素数筛&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;使用示例&lt;/h2&gt;
&lt;h3&gt;快速幂模板&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;long long quickpow(long long base, long long exp, long long mod) {
    long long result = 1;
    base %= mod;
    while (exp &amp;gt; 0) {
        if (exp &amp;amp; 1) result = result * base % mod;
        base = base * base % mod;
        exp &amp;gt;&amp;gt;= 1;
    }
    return result;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;并查集模板&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;int fa[MAXN];

void init(int n) {
    for (int i = 1; i &amp;lt;= n; i++) fa[i] = i;
}

int find(int x) {
    return fa[x] == x ? x : fa[x] = find(fa[x]);
}

void unite(int x, int y) {
    fa[find(x)] = find(y);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;[!TIP]
建议根据自己的使用习惯修改模板，形成自己的代码库。&lt;/p&gt;
&lt;/blockquote&gt;
</content:encoded></item><item><title>Markdown Extended Features</title><link>https://blog.singlelyra.top/posts/markdown-extended/</link><guid isPermaLink="true">https://blog.singlelyra.top/posts/markdown-extended/</guid><description>Read more about Markdown features in Fuwari</description><pubDate>Wed, 01 May 2024 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;GitHub Repository Cards&lt;/h2&gt;
&lt;p&gt;You can add dynamic cards that link to GitHub repositories, on page load, the repository information is pulled from the GitHub API.&lt;/p&gt;
&lt;p&gt;::github{repo=&quot;Fabrizz/MMM-OnSpotify&quot;}&lt;/p&gt;
&lt;p&gt;Create a GitHub repository card with the code &lt;code&gt;::github{repo=&quot;&amp;lt;owner&amp;gt;/&amp;lt;repo&amp;gt;&quot;}&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;::github{repo=&quot;saicaca/fuwari&quot;}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Admonitions&lt;/h2&gt;
&lt;p&gt;Following types of admonitions are supported: &lt;code&gt;note&lt;/code&gt; &lt;code&gt;tip&lt;/code&gt; &lt;code&gt;important&lt;/code&gt; &lt;code&gt;warning&lt;/code&gt; &lt;code&gt;caution&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;:::note
Highlights information that users should take into account, even when skimming.
:::&lt;/p&gt;
&lt;p&gt;:::tip
Optional information to help a user be more successful.
:::&lt;/p&gt;
&lt;p&gt;:::important
Crucial information necessary for users to succeed.
:::&lt;/p&gt;
&lt;p&gt;:::warning
Critical content demanding immediate user attention due to potential risks.
:::&lt;/p&gt;
&lt;p&gt;:::caution
Negative potential consequences of an action.
:::&lt;/p&gt;
&lt;h3&gt;Basic Syntax&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;:::note
Highlights information that users should take into account, even when skimming.
:::

:::tip
Optional information to help a user be more successful.
:::
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Custom Titles&lt;/h3&gt;
&lt;p&gt;The title of the admonition can be customized.&lt;/p&gt;
&lt;p&gt;:::note[MY CUSTOM TITLE]
This is a note with a custom title.
:::&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:::note[MY CUSTOM TITLE]
This is a note with a custom title.
:::
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;GitHub Syntax&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;[!TIP]
&lt;a href=&quot;https://github.com/orgs/community/discussions/16925&quot;&gt;The GitHub syntax&lt;/a&gt; is also supported.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; [!NOTE]
&amp;gt; The GitHub syntax is also supported.

&amp;gt; [!TIP]
&amp;gt; The GitHub syntax is also supported.
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Spoiler&lt;/h3&gt;
&lt;p&gt;You can add spoilers to your text. The text also supports &lt;strong&gt;Markdown&lt;/strong&gt; syntax.&lt;/p&gt;
&lt;p&gt;The content :spoiler[is hidden &lt;strong&gt;ayyy&lt;/strong&gt;]!&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;The content :spoiler[is hidden **ayyy**]!

&lt;/code&gt;&lt;/pre&gt;
</content:encoded></item><item><title>Expressive Code Example</title><link>https://blog.singlelyra.top/posts/expressive-code/</link><guid isPermaLink="true">https://blog.singlelyra.top/posts/expressive-code/</guid><description>How code blocks look in Markdown using Expressive Code.</description><pubDate>Wed, 10 Apr 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here, we&apos;ll explore how code blocks look using &lt;a href=&quot;https://expressive-code.com/&quot;&gt;Expressive Code&lt;/a&gt;. The provided examples are based on the official documentation, which you can refer to for further details.&lt;/p&gt;
&lt;h2&gt;Expressive Code&lt;/h2&gt;
&lt;h3&gt;Syntax Highlighting&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://expressive-code.com/key-features/syntax-highlighting/&quot;&gt;Syntax Highlighting&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;Regular syntax highlighting&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;console.log(&apos;This code is syntax highlighted!&apos;)
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Rendering ANSI escape sequences&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;ANSI colors:
- Regular: [31mRed[0m [32mGreen[0m [33mYellow[0m [34mBlue[0m [35mMagenta[0m [36mCyan[0m
- Bold:    [1;31mRed[0m [1;32mGreen[0m [1;33mYellow[0m [1;34mBlue[0m [1;35mMagenta[0m [1;36mCyan[0m
- Dimmed:  [2;31mRed[0m [2;32mGreen[0m [2;33mYellow[0m [2;34mBlue[0m [2;35mMagenta[0m [2;36mCyan[0m

256 colors (showing colors 160-177):
[38;5;160m160 [38;5;161m161 [38;5;162m162 [38;5;163m163 [38;5;164m164 [38;5;165m165[0m
[38;5;166m166 [38;5;167m167 [38;5;168m168 [38;5;169m169 [38;5;170m170 [38;5;171m171[0m
[38;5;172m172 [38;5;173m173 [38;5;174m174 [38;5;175m175 [38;5;176m176 [38;5;177m177[0m

Full RGB colors:
[38;2;34;139;34mForestGreen - RGB(34, 139, 34)[0m

Text formatting: [1mBold[0m [2mDimmed[0m [3mItalic[0m [4mUnderline[0m
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Editor &amp;amp; Terminal Frames&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://expressive-code.com/key-features/frames/&quot;&gt;Editor &amp;amp; Terminal Frames&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;Code editor frames&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;console.log(&apos;Title attribute example&apos;)
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;!-- src/content/index.html --&amp;gt;
&amp;lt;div&amp;gt;File name comment example&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Terminal frames&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;echo &quot;This terminal frame has no title&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;Write-Output &quot;This one has a title!&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Overriding frame types&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;echo &quot;Look ma, no frame!&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;# Without overriding, this would be a terminal frame
function Watch-Tail { Get-Content -Tail 20 -Wait $args }
New-Alias tail Watch-Tail
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Text &amp;amp; Line Markers&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://expressive-code.com/key-features/text-markers/&quot;&gt;Text &amp;amp; Line Markers&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;Marking full lines &amp;amp; line ranges&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;// Line 1 - targeted by line number
// Line 2
// Line 3
// Line 4 - targeted by line number
// Line 5
// Line 6
// Line 7 - targeted by range &quot;7-8&quot;
// Line 8 - targeted by range &quot;7-8&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Selecting line marker types (mark, ins, del)&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;function demo() {
  console.log(&apos;this line is marked as deleted&apos;)
  // This line and the next one are marked as inserted
  console.log(&apos;this is the second inserted line&apos;)

  return &apos;this line uses the neutral default marker type&apos;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Adding labels to line markers&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;// labeled-line-markers.jsx
&amp;lt;button
  role=&quot;button&quot;
  {...props}
  value={value}
  className={buttonClassName}
  disabled={disabled}
  active={active}
&amp;gt;
  {children &amp;amp;&amp;amp;
    !active &amp;amp;&amp;amp;
    (typeof children === &apos;string&apos; ? &amp;lt;span&amp;gt;{children}&amp;lt;/span&amp;gt; : children)}
&amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Adding long labels on their own lines&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;// labeled-line-markers.jsx
&amp;lt;button
  role=&quot;button&quot;
  {...props}

  value={value}
  className={buttonClassName}

  disabled={disabled}
  active={active}
&amp;gt;

  {children &amp;amp;&amp;amp;
    !active &amp;amp;&amp;amp;
    (typeof children === &apos;string&apos; ? &amp;lt;span&amp;gt;{children}&amp;lt;/span&amp;gt; : children)}
&amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Using diff-like syntax&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;+this line will be marked as inserted
-this line will be marked as deleted
this is a regular line
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;--- a/README.md
+++ b/README.md
@@ -1,3 +1,4 @@
+this is an actual diff file
-all contents will remain unmodified
 no whitespace will be removed either
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Combining syntax highlighting with diff-like syntax&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;  function thisIsJavaScript() {
    // This entire block gets highlighted as JavaScript,
    // and we can still add diff markers to it!
-   console.log(&apos;Old code to be removed&apos;)
+   console.log(&apos;New and shiny code!&apos;)
  }
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Marking individual text inside lines&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;function demo() {
  // Mark any given text inside lines
  return &apos;Multiple matches of the given text are supported&apos;;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Regular expressions&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;console.log(&apos;The words yes and yep will be marked.&apos;)
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Escaping forward slashes&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;echo &quot;Test&quot; &amp;gt; /home/test.txt
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Selecting inline marker types (mark, ins, del)&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;function demo() {
  console.log(&apos;These are inserted and deleted marker types&apos;);
  // The return statement uses the default marker type
  return true;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Word Wrap&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://expressive-code.com/key-features/word-wrap/&quot;&gt;Word Wrap&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;Configuring word wrap per block&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;// Example with wrap
function getLongString() {
  return &apos;This is a very long string that will most probably not fit into the available space unless the container is extremely wide&apos;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;// Example with wrap=false
function getLongString() {
  return &apos;This is a very long string that will most probably not fit into the available space unless the container is extremely wide&apos;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Configuring indentation of wrapped lines&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;// Example with preserveIndent (enabled by default)
function getLongString() {
  return &apos;This is a very long string that will most probably not fit into the available space unless the container is extremely wide&apos;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;// Example with preserveIndent=false
function getLongString() {
  return &apos;This is a very long string that will most probably not fit into the available space unless the container is extremely wide&apos;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Collapsible Sections&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://expressive-code.com/plugins/collapsible-sections/&quot;&gt;Collapsible Sections&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// All this boilerplate setup code will be collapsed
import { someBoilerplateEngine } from &apos;@example/some-boilerplate&apos;
import { evenMoreBoilerplate } from &apos;@example/even-more-boilerplate&apos;

const engine = someBoilerplateEngine(evenMoreBoilerplate())

// This part of the code will be visible by default
engine.doSomething(1, 2, 3, calcFn)

function calcFn() {
  // You can have multiple collapsed sections
  const a = 1
  const b = 2
  const c = a + b

  // This will remain visible
  console.log(`Calculation result: ${a} + ${b} = ${c}`)
  return c
}

// All this code until the end of the block will be collapsed again
engine.closeConnection()
engine.freeMemory()
engine.shutdown({ reason: &apos;End of example boilerplate code&apos; })
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Line Numbers&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://expressive-code.com/plugins/line-numbers/&quot;&gt;Line Numbers&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Displaying line numbers per block&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;// This code block will show line numbers
console.log(&apos;Greetings from line 2!&apos;)
console.log(&apos;I am on line 3&apos;)
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;// Line numbers are disabled for this block
console.log(&apos;Hello?&apos;)
console.log(&apos;Sorry, do you know what line I am on?&apos;)
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Changing the starting line number&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;console.log(&apos;Greetings from line 5!&apos;)
console.log(&apos;I am on line 6&apos;)
&lt;/code&gt;&lt;/pre&gt;
</content:encoded></item><item><title>Simple Guides for Fuwari</title><link>https://blog.singlelyra.top/posts/guide/</link><guid isPermaLink="true">https://blog.singlelyra.top/posts/guide/</guid><description>How to use this blog template.</description><pubDate>Mon, 01 Apr 2024 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;Cover image source: &lt;a href=&quot;https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=2048/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg&quot;&gt;Source&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This blog template is built with &lt;a href=&quot;https://astro.build/&quot;&gt;Astro&lt;/a&gt;. For the things that are not mentioned in this guide, you may find the answers in the &lt;a href=&quot;https://docs.astro.build/&quot;&gt;Astro Docs&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Front-matter of Posts&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;---
title: My First Blog Post
published: 2023-09-09
description: This is the first post of my new Astro blog.
image: ./cover.jpg
tags: [Foo, Bar]
category: Front-end
draft: false
---
&lt;/code&gt;&lt;/pre&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Attribute&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;title&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The title of the post.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;published&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The date the post was published.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;description&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A short description of the post. Displayed on index page.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;image&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The cover image path of the post.&amp;lt;br/&amp;gt;1. Start with &lt;code&gt;http://&lt;/code&gt; or &lt;code&gt;https://&lt;/code&gt;: Use web image&amp;lt;br/&amp;gt;2. Start with &lt;code&gt;/&lt;/code&gt;: For image in &lt;code&gt;public&lt;/code&gt; dir&amp;lt;br/&amp;gt;3. With none of the prefixes: Relative to the markdown file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;tags&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The tags of the post.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;category&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The category of the post.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;draft&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;If this post is still a draft, which won&apos;t be displayed.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Where to Place the Post Files&lt;/h2&gt;
&lt;p&gt;Your post files should be placed in &lt;code&gt;src/content/posts/&lt;/code&gt; directory. You can also create sub-directories to better organize your posts and assets.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;src/content/posts/
├── post-1.md
└── post-2/
    ├── cover.png
    └── index.md
&lt;/code&gt;&lt;/pre&gt;
</content:encoded></item><item><title>Markdown Example</title><link>https://blog.singlelyra.top/posts/markdown/</link><guid isPermaLink="true">https://blog.singlelyra.top/posts/markdown/</guid><description>A simple example of a Markdown blog post.</description><pubDate>Sun, 01 Oct 2023 00:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;An h1 header&lt;/h1&gt;
&lt;p&gt;Paragraphs are separated by a blank line.&lt;/p&gt;
&lt;p&gt;2nd paragraph. &lt;em&gt;Italic&lt;/em&gt;, &lt;strong&gt;bold&lt;/strong&gt;, and &lt;code&gt;monospace&lt;/code&gt;. Itemized lists
look like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;this one&lt;/li&gt;
&lt;li&gt;that one&lt;/li&gt;
&lt;li&gt;the other one&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note that --- not considering the asterisk --- the actual text
content starts at 4-columns in.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Block quotes are
written like so.&lt;/p&gt;
&lt;p&gt;They can span multiple paragraphs,
if you like.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., &quot;it&apos;s all
in chapters 12--14&quot;). Three dots ... will be converted to an ellipsis.
Unicode is supported. ☺&lt;/p&gt;
&lt;h2&gt;An h2 header&lt;/h2&gt;
&lt;p&gt;Here&apos;s a numbered list:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;first item&lt;/li&gt;
&lt;li&gt;second item&lt;/li&gt;
&lt;li&gt;third item&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Note again how the actual text starts at 4 columns in (4 characters
from the left side). Here&apos;s a code sample:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Let me re-iterate ...
for i in 1 .. 10 { do-something(i) }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As you probably guessed, indented 4 spaces. By the way, instead of
indenting the block, you can use delimited blocks, if you like:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;define foobar() {
    print &quot;Welcome to flavor country!&quot;;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(which makes copying &amp;amp; pasting easier). You can optionally mark the
delimited block for Pandoc to syntax highlight it:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;import time
# Quick, count to ten!
for i in range(10):
    # (but not *too* quick)
    time.sleep(0.5)
    print i
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;An h3 header&lt;/h3&gt;
&lt;p&gt;Now a nested list:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;First, get these ingredients:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;carrots&lt;/li&gt;
&lt;li&gt;celery&lt;/li&gt;
&lt;li&gt;lentils&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Boil some water.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Dump everything in the pot and follow
this algorithm:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; find wooden spoon
 uncover pot
 stir
 cover pot
 balance wooden spoon precariously on pot handle
 wait 10 minutes
 goto first step (or shut off burner when done)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Do not bump wooden spoon or it will fall.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Notice again how text always lines up on 4-space indents (including
that last line which continues item 3 above).&lt;/p&gt;
&lt;p&gt;Here&apos;s a link to &lt;a href=&quot;http://foo.bar&quot;&gt;a website&lt;/a&gt;, to a &lt;a href=&quot;local-doc.html&quot;&gt;local
doc&lt;/a&gt;, and to a &lt;a href=&quot;#an-h2-header&quot;&gt;section heading in the current
doc&lt;/a&gt;. Here&apos;s a footnote [^1].&lt;/p&gt;
&lt;p&gt;[^1]: Footnote text goes here.&lt;/p&gt;
&lt;p&gt;Tables can look like this:&lt;/p&gt;
&lt;p&gt;size material color&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;9 leather brown
10 hemp canvas natural
11 glass transparent&lt;/p&gt;
&lt;p&gt;Table: Shoes, their sizes, and what they&apos;re made of&lt;/p&gt;
&lt;p&gt;(The above is the caption for the table.) Pandoc also supports
multi-line tables:&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;keyword text&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;red Sunsets, apples, and
other red or reddish
things.&lt;/p&gt;
&lt;p&gt;green Leaves, grass, frogs
and other things it&apos;s
not easy being.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;A horizontal rule follows.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Here&apos;s a definition list:&lt;/p&gt;
&lt;p&gt;apples
: Good for making applesauce.
oranges
: Citrus!
tomatoes
: There&apos;s no &quot;e&quot; in tomatoe.&lt;/p&gt;
&lt;p&gt;Again, text is indented 4 spaces. (Put a blank line between each
term/definition pair to spread things out more.)&lt;/p&gt;
&lt;p&gt;Here&apos;s a &quot;line block&quot;:&lt;/p&gt;
&lt;p&gt;| Line one
| Line too
| Line tree&lt;/p&gt;
&lt;p&gt;and images can be specified like so:&lt;/p&gt;
&lt;p&gt;Inline math equations go in like so: $\omega = d\phi / dt$. Display
math should get its own line and be put in in double-dollarsigns:&lt;/p&gt;
&lt;p&gt;$$I = \int \rho R^{2} dV$$&lt;/p&gt;
&lt;p&gt;$$
\begin{equation*}
\pi
=3.1415926535
;8979323846;2643383279;5028841971;6939937510;5820974944
;5923078164;0628620899;8628034825;3421170679;\ldots
\end{equation*}
$$&lt;/p&gt;
&lt;p&gt;And note that you can backslash-escape any punctuation characters
which you wish to be displayed literally, ex.: `foo`, *bar*, etc.&lt;/p&gt;
</content:encoded></item><item><title>Include Video in the Posts</title><link>https://blog.singlelyra.top/posts/video/</link><guid isPermaLink="true">https://blog.singlelyra.top/posts/video/</guid><description>This post demonstrates how to include embedded video in a blog post.</description><pubDate>Tue, 01 Aug 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Just copy the embed code from YouTube or other platforms, and paste it in the markdown file.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;---
title: Include Video in the Post
published: 2023-10-19
// ...
---

&amp;lt;iframe width=&quot;100%&quot; height=&quot;468&quot; src=&quot;https://www.youtube.com/embed/5gIf0_xpFPI?si=N1WTorLKL0uwLsU_&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allowfullscreen&amp;gt;&amp;lt;/iframe&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;YouTube&lt;/h2&gt;
&lt;p&gt;&amp;lt;iframe width=&quot;100%&quot; height=&quot;468&quot; src=&quot;https://www.youtube.com/embed/5gIf0_xpFPI?si=N1WTorLKL0uwLsU_&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&quot; allowfullscreen&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/p&gt;
&lt;h2&gt;Bilibili&lt;/h2&gt;
&lt;p&gt;&amp;lt;iframe width=&quot;100%&quot; height=&quot;468&quot; src=&quot;//player.bilibili.com/player.html?bvid=BV1fK4y1s7Qf&amp;amp;p=1&quot; scrolling=&quot;no&quot; border=&quot;0&quot; frameborder=&quot;no&quot; framespacing=&quot;0&quot; allowfullscreen=&quot;true&quot;&amp;gt; &amp;lt;/iframe&amp;gt;&lt;/p&gt;
</content:encoded></item></channel></rss>