Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/manual/luogu/problem/_image/search-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/manual/luogu/problem/_image/search-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/manual/luogu/problem/_image/search-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/manual/luogu/problem/_image/search-4.png
Binary file not shown.
179 changes: 179 additions & 0 deletions docs/manual/luogu/problem/difficulty.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
---
sidebar_position: 3
---

# 题目难度体系

:::caution[此文档为临时难度定义]

注意:这是临时的难度定义,部分试题的难度,以及各档难度的定义可能会在之后有调整。

:::

无论是编程初学者还是具备一定基础的选手,选择合适的题目都是提升算法能力的关键。为此,洛谷建立了一套题目难度分级体系,帮助用户根据自身水平精准筛选训练题目,实现高效进阶。

洛谷的难度由易到难共划分为以下档次,并配有对应的标识颜色:

| 名称 | 颜色 | 国际站名称 |
| :--: | :--: | :--: |
| 入门 | 红色 | Red |
| 普及- | 橙色 | Orange |
| 普及 | 黄色 | Yellow |
| 普及+/提高- | 绿色 | Green |
| 提高 | 青色 | Cyan |
| 提高+/省选- | 蓝色 | Blue |
| 省选/NOI- | 紫色 | Purple |
| NOI/NOI+/CTS | 黑色 | Black |

难度评定由题目出题人、管理员及高水平用户共同完成,难免带有一定的主观判断。同时,题目难度可细分为思维难度与实现难度:部分题目侧重考查思维深度,而另一些则对代码实现能力有更高要求。此外,不同专长领域的选手在解答同一道题时,所感知的难度也可能存在差异。因此,该难度体系仅作为训练参考。

下文将逐一说明各难度档次的大致界定标准及典型代表题目。

## 入门(红色)

入门难度是体系中最低的等级,面向编程新手,主要考察分支结构、循环、数组以及简单字符串处理等基础内容,旨在帮助选手夯实基本功。一般而言,选手在掌握一门编程语言的基本语法后,即可顺利通过该难度的题目。通常而言,CSP-J 的第一题为入门难度。

代表试题:

- [P1001 A+B Problem](https://www.luogu.com.cn/problem/P1001)
- [P1085 [NOIP 2004 普及组] 不高兴的津津](https://www.luogu.com.cn/problem/P1085)
- [P1909 [NOIP 2016 普及组] 买铅笔](https://www.luogu.com.cn/problem/P1909)
- [P1980 [NOIP 2013 普及组] 计数问题](https://www.luogu.com.cn/problem/P1980)
- [P1307 [NOIP 2011 普及组] 数字反转](https://www.luogu.com.cn/problem/P1307)
- [P1047 [NOIP 2005 普及组] 校门外的树](https://www.luogu.com.cn/problem/P1047)
- [P5015 [NOIP 2018 普及组] 标题统计](https://www.luogu.com.cn/problem/P5015)
- [P1200 [USACO1.1] 你的飞碟在这儿 Your Ride Is Here](https://www.luogu.com.cn/problem/P1200)

## 普及-(橙色)

普及-难度试题主要涉及基础算法与简单数据结构,例如简单的模拟、枚举、排序、贪心等算法的简单应用,也可能涉及队列、栈等基础数据结构,以及初等数论的基本概念。一般而言,选手在熟练完成入门难度试题的基础上,经过数十至一百小时的系统学习与训练,完成 100 余道普及-难度的试题,即可顺利完成该难度的试题。通常,CSP-J 的第二题属于普及-难度。如果目标是 CSP-J 组的复赛二等,需要稳定做出该难度试题。

代表试题:

- [P1563 [NOIP 2016 提高组] 玩具谜题](https://www.luogu.com.cn/problem/P1563)
- [P1067 [NOIP 2009 普及组] 多项式输出](https://www.luogu.com.cn/problem/P1067)
- [P1068 [NOIP 2009 普及组] 分数线划定](https://www.luogu.com.cn/problem/P1068)
- [P1028 [NOIP 2001 普及组] 数的计算](https://www.luogu.com.cn/problem/P1028)
- [P1094 [NOIP 2007 普及组] 纪念品分组](https://www.luogu.com.cn/problem/P1094)
- [P1540 [NOIP 2010 提高组] 机器翻译](https://www.luogu.com.cn/problem/P1540)
- [P1030 [NOIP 2001 普及组] 求先序排列](https://www.luogu.com.cn/problem/P1030)
- [P1873 [COCI 2011/2012 #5] EKO / 砍树](https://www.luogu.com.cn/problem/P1873)
- [P1217 [USACO1.5] 回文质数 Prime Palindromes](https://www.luogu.com.cn/problem/P1217)

## 普及(黄色)

普及难度试题仍以基础算法为核心,但在思维深度和代码实现复杂度上,相较普及-难度均有明显提升。题目所涉及的枚举、二分、贪心、动态规划、搜索等算法已不再是简单直接的应用,要求选手具备初步的建模能力,能运用这些算法解决综合性更强的问题。在熟练完成普及-难度的基础上,选手通常需要经过约 200 至 300 小时的系统训练,并完成 100 至 200 道该难度的题目,才能较为稳定地解答此类试题。该难度一般对应 CSP-J 的第三题。若以 CSP-J 复赛一等奖或 CSP-S 复赛二等奖为目标,则需要具备稳定通过该难度题目的能力。

代表试题:

- [P5019 [NOIP 2018 提高组] 铺设道路](https://www.luogu.com.cn/problem/P5019)
- [P1090 [NOIP 2004 提高组] 合并果子](https://www.luogu.com.cn/problem/P1090)
- [P2678 [NOIP 2015 提高组] 跳石头](https://www.luogu.com.cn/problem/P2678)
- [P1083 [NOIP 2012 提高组] 借教室](https://www.luogu.com.cn/problem/P1083)
- [P2058 [NOIP 2016 普及组] 海港](https://www.luogu.com.cn/problem/P2058)
- [P1351 [NOIP 2014 提高组] 联合权值](https://www.luogu.com.cn/problem/P1351)
- [P7910 [CSP-J 2021] 插入排序](https://www.luogu.com.cn/problem/P7910)
- [P8816 [CSP-J 2022] 上升点列](https://www.luogu.com.cn/problem/P8816)
- [P14361 [CSP-S 2025] 社团招新](https://www.luogu.com.cn/problem/P14361)

## 普及+/提高-(绿色)

普及+/提高-难度在普及难度的基础上进一步拔高,要求选手具备更扎实的基础。除需要对基础算法进行更灵活的运用外,该阶段还引入了更复杂的模型,如较复杂的动态规划(区间 DP、树形 DP)、图论建模与相关算法(最短路、生成树),以及并查集、树状数组、线段树等数据结构,均要求熟练掌握。同时,选手需要开始具备从问题模型中提炼出非直观的重要性质与结论的能力,不过这类推导通常仍较为简单。通常,在较熟练完成普及难度试题的基础上,选手需要经过约 300 至 500 小时的系统学习与训练,并完成 200 至 300 道该难度的题目,方能较为稳定地解答此类试题。若以 CSP-J 高分或满分为目标,或以 CSP-S 一等奖为目标,则需要具备较大概率通过该难度题目的能力。

代表试题:

- [P3373 【模板】线段树 2](https://www.luogu.com.cn/problem/P3373)
- [P14078 [GESP202509 七级] 金币收集](https://www.luogu.com.cn/problem/P14078)
- [P10726 [GESP202406 八级] 空间跳跃](https://www.luogu.com.cn/problem/P10726)
- [P13019 [GESP202506 八级] 树上旅行](https://www.luogu.com.cn/problem/P13019)
- [P14924 [GESP202512 八级] 宝石项链](https://www.luogu.com.cn/problem/P14924)
- [P5658 [CSP-S 2019] 括号树](https://www.luogu.com.cn/problem/P5658)
- [P7074 [CSP-J 2020] 方格取数](https://www.luogu.com.cn/problem/P7074)
- [P7913 [CSP-S 2021] 廊桥分配](https://www.luogu.com.cn/problem/P7913)
- [P8818 [CSP-S 2022] 策略游戏](https://www.luogu.com.cn/problem/P8818)
- [P9751 [CSP-J 2023] 旅游巴士](https://www.luogu.com.cn/problem/P9751)
- [P11232 [CSP-S 2024] 超速检测](https://www.luogu.com.cn/problem/P11232)

## 提高(青色)

提高难度标志着选手正式迈入较高水平算法竞赛的门槛。该阶段会引入更高难度的数据结构与算法,但更常见的仍是对先前所学的基础算法与数据结构进行更广泛、更综合的运用。选手不仅需要具备从问题模型中提炼出非直观性质与结论的能力,还需完成一定难度的推导,并能熟练地将已学算法与数据结构进行综合应用。通常,在较熟练完成普及+/提高-难度试题的基础上,选手需经过约 500 至 800 小时的系统学习与训练,方能较为稳定地解答此类试题。若以 CSP-S 强省一等奖或 CCF 奖项认证 7 级或大部分省份的 NOIP 一等奖为目标,则需要具备较大概率通过该难度题目的能力。

代表试题:

- [P1080 [NOIP 2012 提高组] 国王游戏](https://www.luogu.com.cn/problem/P1080)
- [P14080 [GESP202509 八级] 最小生成树](https://www.luogu.com.cn/problem/P14080)
- [P4170 [CQOI2007] 涂色](https://www.luogu.com.cn/problem/P4170)
- [P2680 [NOIP 2015 提高组] 运输计划](https://www.luogu.com.cn/problem/P2680)
- [P3957 [NOIP 2017 普及组] 跳房子](https://www.luogu.com.cn/problem/P3957)
- [P5022 [NOIP 2018 提高组] 旅行](https://www.luogu.com.cn/problem/P5022)
- [P11233 [CSP-S 2024] 染色](https://www.luogu.com.cn/problem/P11233)
- [P14362 [CSP-S 2025] 道路修复](https://www.luogu.com.cn/problem/P14362)
- [P11361 [NOIP2024] 编辑字符串](https://www.luogu.com.cn/problem/P11361)
- [P11830 [省选联考 2025] 幸运数字](https://www.luogu.com.cn/problem/P11830)
- [P15652 [省选联考 2026] 排列游戏 / perm](https://www.luogu.com.cn/problem/P15652)

## 提高+/省选-(蓝色)

提高+/省选-难度的试题已具有相当高的挑战性。除引入后缀数组、AC 自动机、平衡树等复杂的高级数据结构以及线段树合并等较高级技巧外,该阶段还考查更困难、更综合的模型提炼能力。选手需能够从复杂的模型中提炼出多条关键结论作为突破口,并综合运用已学的较困难算法与数据结构进行优化求解。这一阶段要求选手具备一定的直觉与洞察力、较强的数学推导能力和长链条思考能力,并能熟练编写较为复杂的代码并快速完成调试。通常,在较熟练完成提高难度试题的基础上,选手需经过约 800 至 1000 小时的系统学习与训练,方能较大概率在赛场上解答此类试题。若以 NOIP 强省一等奖或多数省份三倍省队分数线为目标,则需具备较大概率通过该难度题目的能力。

代表试题:

- [P5664 [CSP-S 2019] Emiya 家今天的饭](https://www.luogu.com.cn/problem/P5664)
- [P7077 [CSP-S 2020] 函数调用](https://www.luogu.com.cn/problem/P7077)
- [P7114 [NOIP2020] 字符串匹配](https://www.luogu.com.cn/problem/P7114)
- [P7521 [省选联考 2021 B 卷] 取模](https://www.luogu.com.cn/problem/P7521)
- [P7914 [CSP-S 2021] 括号序列](https://www.luogu.com.cn/problem/P7914)
- [P7961 [NOIP2021] 数列](https://www.luogu.com.cn/problem/P7961)
- [P9755 [CSP-S 2023] 种树](https://www.luogu.com.cn/problem/P9755)
- [P10217 [省选联考 2024] 季风](https://www.luogu.com.cn/problem/P10217)
- [P11833 [省选联考 2025] 推箱子](https://www.luogu.com.cn/problem/P11833)
- [P14363 [CSP-S 2025] 谐音替换](https://www.luogu.com.cn/problem/P14363)

## 省选/NOI-(紫色)

省选/NOI-难度的试题已相当于竞赛省队门槛。该难度涉及大量高级算法、数据结构与高等数学知识,如快速傅里叶变换、复杂网络流建模、Polya 定理、后缀自动机、Link-Cut Tree 等。除掌握这些高阶算法本身外,该阶段更注重高度复合的模型提炼、转化与创造性构造能力。选手需具备敏锐的直觉与洞察力、深厚的数学推演功底,能从试题中提炼出多条深刻且非平凡的关键性质,并拥有严密而持久的长链条逻辑推理能力,在有限的比赛时间内编写规模庞大、细节繁杂的代码。通常,在较熟练完成提高+/省选-难度试题的基础上,选手需经过约 1500 至 2000 小时的系统学习与训练,方能较为稳定地在赛场上解答此类试题。若以多数省份省队或 NOI 银牌为目标,则需具备较大概率通过该难度题目的能力。

代表试题:

- [P6624 [省选联考 2020 A 卷] 作业题](https://www.luogu.com.cn/problem/P6624)
- [P7115 [NOIP2020] 移球游戏](https://www.luogu.com.cn/problem/P7115)
- [P7116 [NOIP2020] 微信步数](https://www.luogu.com.cn/problem/P7116)
- [P7737 [NOI2021] 庆典](https://www.luogu.com.cn/problem/P7737)
- [P7962 [NOIP2021] 方差](https://www.luogu.com.cn/problem/P7962)
- [P8866 [NOIP2022] 喵了个喵](https://www.luogu.com.cn/problem/P8866)
- [P9870 [NOIP2023] 双序列拓展](https://www.luogu.com.cn/problem/P9870)
- [P10220 [省选联考 2024] 迷宫守卫](https://www.luogu.com.cn/problem/P10220)
- [P11363 [NOIP2024] 树的遍历](https://www.luogu.com.cn/problem/P11363)
- [P11831 [省选联考 2025] 追忆](https://www.luogu.com.cn/problem/P11831)

## NOI/NOI+/CTS(黑色)

这是最难一档的试题,是 NOI 金牌、IOI 金牌难度的试题。这档试题考察极为深刻的数学理论与技巧,如线性规划与拟阵、Lyndon 树和 Runs 定理、复杂的形式幂级数问题,以及各类高等或者前沿算法在高度综合场景下的创造性组合运用。题目往往具有极强的综合性,要求选手能熟练运用高等的视角以及工具,完成题目模型构建、多条关键性质挖掘到算法设计与实现的完整过程。选手需具备超凡的直觉、深厚的数学推演能力与创新性思维,能够驾驭极长链条的严密推理。通常,选手需在省选难度的基础上,经过 2000 小时以上的高强度训练,才有希望在赛场上解答此类试题。若以 NOI 金牌为目标,则需具备较大概率通过该难度题目的能力。

代表试题:

- [P5659 [CSP-S 2019] 树上的数](https://www.luogu.com.cn/problem/P5659)
- [P6776 [NOI2020] 超现实树](https://www.luogu.com.cn/problem/P6776)
- [P8500 [NOI2022] 冒泡排序](https://www.luogu.com.cn/problem/P8500)
- [P9479 [NOI2023] 桂花树](https://www.luogu.com.cn/problem/P9479)
- [P9167 [省选联考 2023] 城市建造](https://www.luogu.com.cn/problem/P9167)
- [P10221 [省选联考 2024] 重塑时光](https://www.luogu.com.cn/problem/P10221)
- [P10789 [NOI2024] 登山](https://www.luogu.com.cn/problem/P10789)
- [P11234 [CSP-S 2024] 擂台游戏](https://www.luogu.com.cn/problem/P11234)
- [P14637 [NOIP2025] 树的价值](https://www.luogu.com.cn/problem/P14637)

## NOI+/CTS 难度参考试题

如果后续进行了黑题难度拆分,拆分成 NOI 难度和 NOI+/CTS 难度,将会以下列试题作为 NOI+/CTS 难度试题的标准:

- [P4337 [ZJOI2018] 线图](https://www.luogu.com.cn/problem/P4337)
- [P4502 [ZJOI2018] 保镖](https://www.luogu.com.cn/problem/P4502)
- [P8331 [ZJOI2022] 简单题](https://www.luogu.com.cn/problem/P8331)
- [P8332 [ZJOI2022] 面条](https://www.luogu.com.cn/problem/P8332)
- [P8498 [NOI2022] 树上邻域数点](https://www.luogu.com.cn/problem/P8498)
- [P9171 [省选联考 2023] 染色数组](https://www.luogu.com.cn/problem/P9171)
- [P10065 [SNOI2024] 字符树](https://www.luogu.com.cn/problem/P10065)
- [P10790 [NOI2024] 树形图](https://www.luogu.com.cn/problem/P10790)
- [P11834 [省选联考 2025] 岁月](https://www.luogu.com.cn/problem/P11834)
- [P14927 [北大集训 2025] 三选二](https://www.luogu.com.cn/problem/P14927)
- [P14928 [北大集训 2025] 深红](https://www.luogu.com.cn/problem/P14928)
6 changes: 6 additions & 0 deletions docs/manual/luogu/problem/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ sidebar_position: 4

关于评测及返回的各种状态、常见的评测不通过的原因、评测机具体支持的语言及输入输出格式详见:[在线评测](./judging.md)

## 题目难度体系

洛谷题目会按照难度体系进行分级,帮助用户根据自身水平筛选合适的训练题目。难度评定具有一定主观性,仅作为训练参考。

详见:[题目难度体系](./difficulty.md)

## 个人题库与上传

进入个人主页-题库-我创建的题目,点击新建题目,填写需要的内容(可以不全填)之后保存题面。可以使用 Markdown 美化,详见 [Markdown 格式手册](../../../rules/academic/handbook/markdown.md)。再上传数据包即可。普通用户可创建私有题目数量的上限为 50 题。
Expand Down
8 changes: 3 additions & 5 deletions docs/manual/luogu/problem/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@ sidebar_position: 2

我们最想要的题目并没有出现在最前面,而且一些不相关的题目也混入其中。

![image-20230405114742008](_image/search-2.png)
所以这时候建议使用标签选择器(点击【筛选算法/来源/时间】)来直接指定来源【CSP-S 提高级】和时间【2019】。

所以这时候建议使用标签选择器(点击【筛选算法/来源/时间】)来直接指定来源【CSP S 提高级】和时间【2019】。

![指定标签](_image/search-3.png)
![指定标签](_image/search-2.png)

这样搜索结果就只有有这两个标签的题目,并且按照题号顺序排好了。

![使用标签的搜索结果](_image/search-4.png)
![使用标签的搜索结果](_image/search-3.png)

除此之外,您还可以使用算法来筛选题目,来找到只包含该算法的题目。再配合上难度筛选,就可以方便的找到适合自己的题目了。
2 changes: 1 addition & 1 deletion docs/rules/academic/lgr/contest-standard.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ sidebar_position: 10
- **第二题**不超过【普及-】。正常写标程代码不超过 700B,基准通过率 40%。
- **所有题**题目描述应为贴近生活的、不超过 500 汉字的现代文,不应存在任何抽象概念或者长难句,进行了良好的分段以及句读。不应当使用形式化的题意。不添加和解题无关的背景。
- **所有题**出现的所有数学概念**不得超过初中范围**。(例如,求和不得使用 $\sum$ 符号,而应使用省略号表示。),且涉及的算法知识必须在 CCF 大纲入门级范围内。特别地,允许**最后一题**考察提高组知识点的简单应用,但是需要在**该题题目背景**和**比赛页面**明确标出。
- **所有题**难度不超过【普及+/提高】。
- **所有题**难度不超过【普及+/提高-】。
- **所有题**不推荐构造等形式较新的题,**禁止出现提交答案题、交互题**。如果出现形式创新的题,审核员会仔细检查形式创新的必要性。
- 如上要求当中,“字数”指的是“题目描述”部分**以及题目描述的补充说明**,例如专业领域术语的定义。
- 该比赛所使用的题目版权归属洛谷,不得授权其他商业机构(无论是否免费)公开使用这些题目及其附属资源,特别包括**在未经洛谷允许的情况下举办同步赛**。
Expand Down
Loading
Loading