如果你经常在洛谷刷题,可能用过一款叫“梦回考场”的脚本——它把洛谷的题目页面重建成类似 PDF 考卷的样子。但前一阵子,它寄了。
既然等不到原作者更新,我就决定自己造一个。现在的成果是这个,不仅能完全还原原脚本的体验,还顺手修了一堆陈年老 Bug。
它到底能干什么?
-
从零重建题目页面
原来的脚本依赖页面 DOM 元素,洛谷一改版就崩。我直接读取洛谷埋藏在页面里的 JSON 数据(#lentille-context),完全自己画页面,再也不怕改版。 -
LaTeX 公式完美显示
通过 Tampermonkey 的@require预加载 KaTeX,自动渲染所有$...$和$$...$$公式。彻底告别满屏的$\sum$源码。 -
Markdown 语法全支持
题目描述里常见的粗体、斜体、列表、链接、行内代码,统统帮你转为 HTML。并且我做了一层“公式保护”——先用占位符把公式藏起来,等 Markdown 转换完再放回去,保证公式里的_和*不会被错误转成斜体/粗体。 -
时间和内存限制回归
原版“梦回考场”会把侧栏杀得一干二净,导致时间限制(比如1.00s)、内存限制(128.00 MB)也消失了。我从 JSON 里提取了limits字段,哪怕数据是数组(每个子任务一个值),也自动取第一个并转换单位,然后优雅地显示在题目标题下方。 -
段落缩进一致
强迫症福音——现在所有<p>段落都保持首行缩进两个字符,再也不会出现“第二段突然顶格写”的窒息情况。 -
保留原版功能按钮
提交、复制 Markdown、题解这三个按钮被“偷梁换柱”移到了顶部工具栏,功能与原版完全一致。
代码
// ==UserScript==
// @name 洛谷题目转 PDF
// @namespace http://tampermonkey.net/
// @version 5.2
// @description 从JSON重建页面,完美支持洛谷扩展Markdown(折叠框、引言、表格合并、居中、cute-table)
// @match https://www.luogu.com.cn/problem/*
// @require https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js
// @require https://cdn.jsdelivr.net/npm/marked/marked.min.js
// @grant GM_addStyle
// ==/UserScript==
(function () {
"use strict";
if (typeof katex === 'undefined') {
console.error('[Luogu-RER] 致命错误:KaTeX 核心库未加载');
return;
}
if (typeof marked === 'undefined') {
console.error('[Luogu-RER] 致命错误:marked 未加载');
return;
}
marked.setOptions({ breaks: true, gfm: true });
window.addEventListener('load', () => {
setTimeout(MainScript, 500);
});
function MainScript() {
const path = window.location.pathname;
if (!/^\/problem\/[PBCFSPATU]/.test(path)) return;
const hash = window.location.hash.toLowerCase();
if (hash.includes('submit') || hash.includes('solution')) {
console.log('[Luogu-RER] 检测到提交/题解页面,跳过渲染');
return;
}
console.log("[Luogu-RER] 开始...");
// ---------- 1. 提取原始按钮 ----------
let submitBtn = null, copyBtn = null, solutionBtn = null;
const sidebar = document.querySelector('.sidebar-container .side');
if (sidebar) {
sidebar.querySelectorAll('button, a').forEach(el => {
const text = el.textContent.trim();
if (text === '提交') submitBtn = el;
else if (text.includes('题解')) solutionBtn = el;
});
}
if (!submitBtn) {
document.querySelectorAll('button, a').forEach(el => {
if (el.textContent.trim() === '提交') submitBtn = el;
});
}
const actionContainer = document.querySelector('.problem-block-actions');
if (actionContainer) {
actionContainer.querySelectorAll('button, a').forEach(btn => {
if (btn.textContent.trim().includes('复制 Markdown')) copyBtn = btn;
});
}
console.log('[Luogu-RER] 按钮:提交=' + !!submitBtn + ' 复制=' + !!copyBtn + ' 题解=' + !!solutionBtn);
// ---------- 2. 读取题目数据 ----------
const contextScript = document.querySelector('#lentille-context');
if (!contextScript) { console.error("[Luogu-RER] 找不到题目数据"); return; }
let problemData;
try {
problemData = JSON.parse(contextScript.textContent).data.problem;
} catch (e) { console.error("[Luogu-RER] JSON解析失败", e); return; }
const pid = problemData.pid;
const name = problemData.name;
const content = problemData.content || {};
const desc = content.description || '';
const fmtIn = content.formatI || '';
const fmtOut = content.formatO || '';
const hint = content.hint || '';
const samples = problemData.samples || [];
const limits = problemData.limits || {};
function getFirstValid(raw) { return Array.isArray(raw) ? raw[0] : raw; }
function formatTime(raw) {
const val = getFirstValid(raw);
if (val === undefined || val === null || val === '') return '';
const num = Number(val);
return (!isNaN(num) && num > 0) ? (num / 1000).toFixed(2) + 's' : String(val);
}
function formatMemory(raw) {
const val = getFirstValid(raw);
if (val === undefined || val === null || val === '') return '';
const num = Number(val);
if (!isNaN(num) && num > 0) {
return num > 1024 ? (num / 1024).toFixed(2) + ' MB' : num.toFixed(2) + ' MB';
}
return String(val);
}
const timeLimit = formatTime(limits.time);
const memoryLimit = formatMemory(limits.memory);
// ---------- 3. 清空并重建 ----------
const mainContainer = document.querySelector('#app > .main-container');
if (!mainContainer) return;
const hidden = document.createElement('div');
hidden.id = 'hidden-btns';
hidden.style.display = 'none';
document.body.appendChild(hidden);
if (submitBtn) hidden.appendChild(submitBtn);
if (copyBtn) hidden.appendChild(copyBtn);
if (solutionBtn) hidden.appendChild(solutionBtn);
document.querySelector('#app > nav')?.remove();
document.querySelector('#app > .top-bar')?.remove();
document.querySelector('#app > .page-loading')?.remove();
document.querySelector('.sidebar-container')?.remove();
if (actionContainer) actionContainer.remove();
mainContainer.innerHTML = '';
mainContainer.style.cssText = 'margin:12px auto;width:100%;max-width:1191px;padding:0;';
BuildPage(mainContainer, { pid, name, desc, fmtIn, fmtOut, hint, samples, hidden, timeLimit, memoryLimit });
}
function BuildPage(container, data) {
// 工具栏
const toolbar = document.createElement('div');
toolbar.id = 'Custom-toolbar';
toolbar.style.cssText = `
position:sticky;top:0;z-index:1000;background:#2c3e50;color:#fff;
display:flex;align-items:center;justify-content:space-between;
padding:0 20px;height:48px;box-shadow:0 2px 8px rgba(0,0,0,0.2);
font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
flex-wrap:wrap;gap:6px;
`;
const leftDiv = document.createElement('div');
leftDiv.style.cssText = 'display:flex;align-items:center;gap:10px;font-size:15px;';
leftDiv.innerHTML = `<span style="font-weight:700;color:#61dafb">${data.pid}</span>
<span style="color:#ecf0f1;max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">${data.name}</span>`;
const rightDiv = document.createElement('div');
rightDiv.style.cssText = 'display:flex;align-items:center;gap:4px;flex-wrap:wrap;';
const hiddenBtns = data.hidden.querySelectorAll('button, a');
let hSubmit = null, hCopy = null, hSolution = null;
hiddenBtns.forEach(el => {
const t = el.textContent.trim();
if (t === '提交') hSubmit = el;
else if (t.includes('复制 Markdown')) hCopy = el;
else if (t.includes('题解')) hSolution = el;
});
const mkBtn = (label, hiddenBtn, cls) => {
const b = document.createElement('button');
b.textContent = label;
b.className = 'tb-btn' + (cls ? ' ' + cls : '');
b.style.cssText = `
display:inline-flex;align-items:center;gap:4px;padding:5px 12px;
border-radius:4px;border:none;font-size:13px;cursor:pointer;
background:rgba(255,255,255,0.08);color:#ecf0f1;
transition:0.2s;white-space:nowrap;
`;
if (cls === 'tb-submit') b.style.background='#3498db';
if (hiddenBtn) {
b.onclick = e => { e.preventDefault(); try { hiddenBtn.click(); } catch (err) { console.error(err); } };
} else {
b.onclick = e => {
e.preventDefault();
if (label === '提交') window.location.hash = 'submit';
else if (label === '题解') window.location.hash = 'solution';
else if (label.includes('复制 Markdown')) {
const content = document.querySelector('#Problem-element')?.innerText || '';
navigator.clipboard.writeText(content).then(() => alert('已复制')).catch(() => alert('复制失败'));
}
};
}
return b;
};
rightDiv.appendChild(mkBtn('提交', hSubmit, 'tb-submit'));
rightDiv.appendChild(mkBtn('复制 Markdown', hCopy));
rightDiv.appendChild(mkBtn('题解', hSolution));
toolbar.appendChild(leftDiv);
toolbar.appendChild(rightDiv);
container.appendChild(toolbar);
// 题目内容区
const problemDiv = document.createElement('div');
problemDiv.id = 'Problem-element';
problemDiv.style.cssText = `
color:#000;background:#fff;padding:77px 141px 156px;box-shadow:0 1px 10px rgba(0,0,0,0.1);
font-family:KaTeX_Main,SimSun,serif;font-size:24px;line-height:1.6;max-width:1191px;margin:0 auto;
`;
container.appendChild(problemDiv);
// 头部
const hdr = document.createElement('header');
hdr.style.cssText = 'font-size:20px;display:flex;flex-wrap:wrap;margin-bottom:48px;font-family:KaTeX_Main,SimSun,serif;';
hdr.innerHTML = `<div style="margin-right:auto">洛谷 Luogu</div><div>${data.pid} ${data.name}</div><hr style="flex-basis:100%;border:1px solid #bfbfbf;margin:0">`;
problemDiv.appendChild(hdr);
const title = document.createElement('h1');
title.textContent = data.name;
title.style.cssText = 'text-align:center;font-size:36px;margin:37px 0 12px 0;font-weight:normal;font-family:KaTeX_Main,SimHei,sans-serif';
problemDiv.appendChild(title);
// 时间/内存
if (data.timeLimit || data.memoryLimit) {
const limitsDiv = document.createElement('div');
limitsDiv.style.cssText = 'text-align:center;font-size:18px;color:#666;margin-bottom:24px;font-family:KaTeX_Main,SimHei,sans-serif;';
let parts = [];
if (data.timeLimit) parts.push('时间限制:' + data.timeLimit);
if (data.memoryLimit) parts.push('内存限制:' + data.memoryLimit);
limitsDiv.textContent = parts.join(' ');
problemDiv.appendChild(limitsDiv);
}
// ========== 洛谷自定义语法预处理 ==========
function preprocessLuoguSyntax(md) {
if (!md) return '';
// 1. 处理表格合并(必须在其他处理之前,因为可能包含公式等)
md = convertMergedTables(md);
// 2. cute-table 标记
md = md.replace(/^::cute-table\{tuack\}\n/gm, '<!--tuack-->\n');
// 3. 折叠框、引言、居中/居右(四个冒号/三个冒号)
// 四个冒号(三层嵌套的最外层,暂只支持三层,即四个冒号)
md = md.replace(/::::(\w+)(?:\[([^\]]*)\])?(?:\{([^}]*)\})?\n([\s\S]*?)\n::::/g,
(_, type, title, attrs, content) => {
const open = attrs && attrs.includes('open') ? ' open' : '';
return `<details class="luogu-fold luogu-${type}"${open}>
<summary>${title || ''}</summary>
${content}
</details>`;
}
);
// 三个冒号
md = md.replace(/:::(\w+)(?:\[([^\]]*)\])?(?:\{([^}]*)\})?\n([\s\S]*?)\n:::/g,
(_, type, title, attrs, content) => {
if (type === 'epigraph') {
return `<blockquote class="epigraph">
<p>${content}</p>
${title ? `<cite>${title}</cite>` : ''}
</blockquote>`;
} else if (type === 'align') {
if (attrs === 'center') return `<div class="align-center">${content}</div>`;
if (attrs === 'right') return `<div class="align-right">${content}</div>`;
} else if (['info', 'success', 'warning', 'error'].includes(type)) {
const open = attrs && attrs.includes('open') ? ' open' : '';
return `<details class="luogu-fold luogu-${type}"${open}>
<summary>${title || ''}</summary>
${content}
</details>`;
}
return _;
}
);
return md;
}
// 将包含 ^ 或 < 的表格转换为 HTML
function convertMergedTables(md) {
// 匹配整个表格:连续的行,每行以 | 开头,且包含至少一个 | 作为分隔(含分隔行)
const tableRegex = /(^\|.+\|\s*$[\r\n])+/gm;
return md.replace(tableRegex, (tableBlock) => {
const lines = tableBlock.split(/\r?\n/).filter(line => line.trim().length > 0);
if (lines.length < 2) return tableBlock; // 至少两行
// 检测是否有合并标记
const hasMerge = lines.some(line => /(?:^|\|)\s*(\^|<)\s*(?:\||$)/.test(line));
if (!hasMerge) return tableBlock; // 无标记,保留原样
// 解析表格
const rows = [];
let header = [];
let hasHeader = false;
// 判断是否有分隔行(第二行且包含 :---)
let startIdx = 0;
if (lines.length >= 2 && /^\|[\s\-:]+\|/.test(lines[1])) {
// 有表头:第一行是表头,第二行是分隔行
header = parseRow(lines[0]);
hasHeader = true;
startIdx = 2;
} else {
// 无表头:第一行就是数据行
startIdx = 0;
}
// 解析数据行
for (let i = startIdx; i < lines.length; i++) {
rows.push(parseRow(lines[i]));
}
// 如果 rows 为空且有表头,则表头也是数据(实际上无表头情况我们已经处理了)
if (rows.length === 0 && hasHeader) {
rows.push(header);
hasHeader = false;
}
// 计算列数:取最大单元格数
const colCount = Math.max(...rows.map(r => r.length));
if (hasHeader && header.length < colCount) {
// 补齐表头
while (header.length < colCount) header.push('');
}
// 处理合并标记:构建最终单元格的 rowspan 和 colspan,以及内容
// 我们使用一个二维数组 track[row][col] 记录 { content, rowspan, colspan }
const grid = [];
const rowCount = rows.length;
// 初始化跟踪矩阵
for (let r = 0; r < rowCount; r++) {
grid[r] = new Array(colCount).fill(null);
}
// 记录哪些位置已被合并占用
const occupied = Array.from({ length: rowCount }, () => new Array(colCount).fill(false));
// 填充数据
for (let r = 0; r < rowCount; r++) {
const cells = rows[r];
let colIdx = 0; // 当前逻辑列
for (let c = 0; c < cells.length; c++) {
// 跳过已占用的列
while (colIdx < colCount && occupied[r][colIdx]) colIdx++;
if (colIdx >= colCount) break;
const val = cells[c].trim();
if (val === '^') {
// 向上合并:找到上方最近一个非空单元格,增加其 rowspan,并标记本位置为被合并
let targetRow = r - 1;
while (targetRow >= 0 && grid[targetRow][colIdx] === null) targetRow--;
if (targetRow >= 0) {
grid[targetRow][colIdx].rowspan++;
occupied[r][colIdx] = true; // 该位置被上方合并占用
} else {
// 无法向上合并,视为普通空单元格
grid[r][colIdx] = { content: '', rowspan: 1, colspan: 1 };
occupied[r][colIdx] = true;
}
colIdx++;
} else if (val === '<') {
// 向左合并:与左边单元格合并,增加左边单元格的 colspan,标记当前位置被合并
if (colIdx > 0) {
// 找到左边最近的单元格
let leftCol = colIdx - 1;
while (leftCol >= 0 && grid[r][leftCol] === null) leftCol--;
if (leftCol >= 0) {
grid[r][leftCol].colspan++;
occupied[r][colIdx] = true;
}
}
// 如果 colIdx == 0 无法向左合并,则当作空单元格
colIdx++;
} else {
// 普通内容
grid[r][colIdx] = { content: val, rowspan: 1, colspan: 1 };
occupied[r][colIdx] = true;
colIdx++;
}
}
}
// 构建 HTML 表格
let html = '<table>';
if (hasHeader) {
html += '<thead><tr>';
for (let c = 0; c < colCount; c++) {
const cell = header[c] ? header[c].trim() : '';
html += `<th>${cell}</th>`;
}
html += '</tr></thead>';
}
html += '<tbody>';
for (let r = 0; r < rowCount; r++) {
html += '<tr>';
for (let c = 0; c < colCount; c++) {
const cell = grid[r][c];
if (!cell || occupied[r][c] === false) continue; // 被合并占用的跳过
if (cell.rowspan === 1 && cell.colspan === 1) {
html += `<td>${cell.content}</td>`;
} else {
const rowspan = cell.rowspan > 1 ? ` rowspan="${cell.rowspan}"` : '';
const colspan = cell.colspan > 1 ? ` colspan="${cell.colspan}"` : '';
html += `<td${rowspan}${colspan}>${cell.content}</td>`;
}
}
html += '</tr>';
}
html += '</tbody></table>';
return html;
});
}
// 解析一行单元格,返回数组
function parseRow(line) {
// 去除首尾空格和管道符,然后按 | 分割
return line.replace(/^\||\|$/g, '').split('|').map(c => c.trim());
}
// ========== Markdown + LaTeX 渲染 ==========
function renderMarkdownWithMath(md) {
if (!md) return '';
let processed = preprocessLuoguSyntax(md);
// 保护公式
const formulas = [];
processed = processed.replace(/(\$\$[\s\S]*?\$\$|\$[^$]+\$)/g, (match) => {
const id = formulas.length;
formulas.push(match);
return `⧙FORMULA${id}⧘`;
});
// marked 解析
let html = marked.parse(processed);
// 恢复公式并渲染
html = html.replace(/⧙FORMULA(\d+)⧘/g, (_, idx) => {
const formula = formulas[parseInt(idx)];
const isDisplay = formula.startsWith('$$');
const clean = isDisplay ? formula.slice(2, -2).trim() : formula.slice(1, -1).trim();
try {
return katex.renderToString(clean, { displayMode: isDisplay, throwOnError: false });
} catch (e) {
console.warn('[Luogu-RER] 公式渲染失败,保留原文', clean, e);
return formula;
}
});
return html;
}
function insertContent(md) {
if (!md) return;
const html = renderMarkdownWithMath(md);
const div = document.createElement('div');
div.innerHTML = html;
div.querySelectorAll('p').forEach(p => {
if (!p.style.textIndent) p.style.textIndent = '2em';
});
// 处理 <!--tuack--> 标记
const walker = document.createTreeWalker(div, NodeFilter.SHOW_COMMENT);
const comments = [];
while (walker.nextNode()) comments.push(walker.currentNode);
comments.forEach(comment => {
if (comment.textContent.trim() === 'tuack') {
let next = comment.nextSibling;
while (next && next.nodeType === Node.TEXT_NODE && !next.textContent.trim()) {
next = next.nextSibling;
}
if (next && next.nodeName === 'TABLE') {
const wrapper = document.createElement('div');
wrapper.className = 'tuack-table';
comment.parentNode.insertBefore(wrapper, comment);
wrapper.appendChild(next);
comment.remove();
}
}
});
while (div.firstChild) {
problemDiv.appendChild(div.firstChild);
}
}
// 添加各部分
insertContent(data.desc);
if (data.fmtIn) {
problemDiv.appendChild(createH2('【输入格式】'));
insertContent(data.fmtIn);
}
if (data.fmtOut) {
problemDiv.appendChild(createH2('【输出格式】'));
insertContent(data.fmtOut);
}
// 样例
data.samples.forEach((s, i) => {
problemDiv.appendChild(createH2('【样例 ' + (i+1) + '】'));
const inp = document.createElement('p');
inp.textContent = '输入 #' + (i+1);
inp.style.fontWeight = 'bold';
problemDiv.appendChild(inp);
const preIn = document.createElement('pre');
preIn.textContent = s[0] || '';
preIn.style.cssText = 'margin:5px 0 20px;padding:10px;border:1px solid blue;font-family:Consolas,monospace;font-size:20px;line-height:1.5;background:#f8f8f8';
problemDiv.appendChild(preIn);
const outp = document.createElement('p');
outp.textContent = '输出 #' + (i+1);
outp.style.fontWeight = 'bold';
problemDiv.appendChild(outp);
const preOut = document.createElement('pre');
preOut.textContent = s[1] || '';
preOut.style.cssText = 'margin:5px 0 20px;padding:10px;border:1px solid blue;font-family:Consolas,monospace;font-size:20px;line-height:1.5;background:#f8f8f8';
problemDiv.appendChild(preOut);
});
if (data.hint) {
problemDiv.appendChild(createH2('【提示与说明】'));
insertContent(data.hint);
}
function createH2(text) {
const h2 = document.createElement('h2');
h2.textContent = text;
h2.style.cssText = 'margin-top:43px;margin-bottom:18px;font-size:26px;font-weight:normal;font-family:KaTeX_Main,SimHei,sans-serif;text-indent:1em';
return h2;
}
applyStyles();
}
function applyStyles() {
GM_addStyle(`
@media (prefers-color-scheme: light) { body { background-color: #e6e6e6; } }
@media (prefers-color-scheme: dark) { body { background-color: #333333; } #Problem-element { background: #f5f5f5; } }
#Problem-element p { margin: 0.5em 0; text-indent: 2em; }
#Problem-element strong { font-weight: bold; }
#Problem-element em { font-style: italic; }
#Problem-element h1, #Problem-element h2, #Problem-element h3, #Problem-element h4, #Problem-element h5, #Problem-element h6 {
font-weight: normal; font-family: KaTeX_Main, SimHei, sans-serif;
}
#Problem-element h1 { font-size: 1.8em; margin: 0.8em 0; }
#Problem-element h2 { font-size: 1.4em; margin: 0.6em 0; }
#Problem-element h3 { font-size: 1.2em; margin: 0.5em 0; }
#Problem-element ul, #Problem-element ol { padding-left: 2em; }
#Problem-element li { margin: 0.2em 0; }
#Problem-element a { color: #3498db; text-decoration: none; }
#Problem-element a:hover { text-decoration: underline; }
#Problem-element img { max-width: 100%; height: auto; }
#Problem-element code { font-family: Consolas, monospace; background: #f0f0f0; padding: 2px 6px; border-radius: 3px; }
#Problem-element pre { white-space: pre-wrap; background: #f8f8f8; border: 1px solid #ddd; padding: 10px; font-family: Consolas, monospace; font-size: 18px; }
#Problem-element table { border-collapse: collapse; margin: 1em 0; width: auto; }
#Problem-element th, #Problem-element td { border: 1px solid #ccc; padding: 6px 12px; text-align: center; }
#Problem-element th { background: #f2f2f2; }
#Problem-element ::selection { background-color: #99c1da; mix-blend-mode: multiply; color: inherit; }
#Custom-toolbar .tb-btn:hover { background: rgba(255,255,255,0.18) !important; color: white !important; }
#Custom-toolbar .tb-submit:hover { background: #2980b9 !important; }
/* 洛谷自定义折叠框 */
#Problem-element details.luogu-fold {
margin: 1em 0;
border: 1px solid #e0e0e0;
border-radius: 4px;
padding: 0.5em 1em;
background: #fafafa;
}
#Problem-element details.luogu-fold[open] { background: #fff; }
#Problem-element details.luogu-fold summary { font-weight: bold; cursor: pointer; }
#Problem-element details.luogu-info { border-left: 4px solid #3498db; }
#Problem-element details.luogu-success { border-left: 4px solid #27ae60; }
#Problem-element details.luogu-warning { border-left: 4px solid #f39c12; }
#Problem-element details.luogu-error { border-left: 4px solid #e74c3c; }
/* 引言 */
#Problem-element blockquote.epigraph {
margin: 1em 0;
padding: 1em;
background: #f5f5f5;
border-left: 4px solid #ccc;
font-style: italic;
}
#Problem-element blockquote.epigraph cite {
display: block;
text-align: right;
font-style: normal;
font-weight: bold;
}
/* 对齐 */
#Problem-element .align-center { text-align: center; }
#Problem-element .align-right { text-align: right; }
@media (max-width: 768px) {
#Custom-toolbar { height: auto !important; padding: 6px 12px !important; }
#Custom-toolbar > div:first-child { font-size: 13px !important; width: 100% !important; }
.tb-btn { font-size: 12px !important; padding: 4px 8px !important; }
#Problem-element { padding: 20px 16px !important; }
}
@media (max-width: 480px) {
#Custom-toolbar > div:last-child { width: 100% !important; justify-content: flex-start !important; }
}
`);
}
})();(本文脚本版本:v5.2,最后更新于 2026年7月)
本文使用了大语言模型进行润色。
