cp-algorithms/cp-algorithms
GitHub: cp-algorithms/cp-algorithms
一个由社区维护的竞赛编程算法与数据结构知识库,提供详尽的理论文章和代码实现。
Stars: 10952 | Forks: 2113
# 竞赛编程算法
本项目的目标是翻译这个优秀的资源
[https://e-maxx.ru/algo](https://e-maxx.ru/algo),它提供了许多算法和数据结构的详细描述,
这些算法和数据结构在竞赛编程领域尤为流行。
此外,我们希望通过扩展已有文章并向合集中添加新文章,
来进一步丰富和改进这些知识库。
我们是一个无广告、由志愿者运营且对所有人免费的网站。用户可以贡献文章,或者赞助文章赏金以扩大算法覆盖范围。我们非常感谢您的帮助。
编译后的页面已发布在 [https://cp-algorithms.com/](https://cp-algorithms.com/)。
## 更新日志
- 2025 年 8 月:全面改版了 CP-Algorithms 的[捐赠系统](https://github.com/sponsors/cp-algorithms)。请考虑支持我们,以便我们能够发展壮大!
- 2025 年 8 月:推出了一个 [Discord 服务器](https://discord.gg/HZ5AecN3KX)!
- 2024 年 10 月:欢迎新维护者:[jxu](https://github.com/jxu)、[mhayter](https://github.com/mhayter) 和 [kostero](https://github.com/kostero)!
- 2024 年 10 月 15 日:基于 GitHub Pages 的镜像站点现已在 [https://gh.cp-algorithms.com/](https://gh.cp-algorithms.com/) 上提供服务,同时可在 [https://lib.cp-algorithms.com/](https://lib.cp-algorithms.com/) 访问辅助竞赛编程库。
- 2024 年 7 月 16 日:对 [寻找强连通分量 / 构建缩点图](https://cp-algorithms.com/graph/strongly-connected-components.html) 文章进行了重大修订。
- 2023 年 6 月 26 日:为[新文章](https://cp-algorithms.com/feed_rss_created.xml)和[文章更新](https://cp-algorithms.com/feed_rss_updated.xml)添加了自动 RSS 订阅源。
- 2022 年 12 月 20 日:仓库名称及所属组织已重命名!现在仓库位于 [https://github.com/cp-algorithms/cp-algorithms](https://github.com/cp-algorithms/cp-algorithms)。如果您有本地仓库,建议更新其上游链接。
- 2022 年 10 月 31 日:现在可以选择并复制文章中公式的 $\LaTeX$ 源代码了。
- 2022 年 6 月 8 日:已启用标签功能。每篇文章现在都会被标记为翻译或原创,完整的标签信息可在[标签索引](https://cp-algorithms.com/tags.html)中查看。对于翻译的文章,点击 `From: X` 标签即可跳转到原文。
- 2022 年 6 月 7 日:现在会追踪每页的最近一次提交日期以及带有贡献比例的作者列表。
- 2022 年 6 月 5 日:启用了内容标签页和侧边栏导航。导航已移至[单独页面](https://cp-algorithms.com/navigation.html),并且每当创建新文章或移动旧文章时,都应调整 [navigation.md](https://github.com/cp-algorithms/cp-algorithms/blob/main/src/navigation.md) 中的结构。
- 2022 年 1 月 16 日:切换到使用 [MkDocs](https://www.mkdocs.org/) 网站生成器,并搭配 [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) 主题。这赋予了网站更现代的外观,带来了一些新功能(深色模式、更好的搜索等),使网站更加稳定(在数学公式渲染方面),并让贡献变得更加容易。
### 新文章
- (2026 年 6 月 9 日) [最小割 - Stoer-Wagner 算法](https://cp-algorithms.com/graph/stoer_wagner_mincut.html)
- (2026 年 3 月 28 日) [重心分解](https://cp-algorithms.com/graph/centroid_decomposition.html)
- (2025 年 8 月 19 日) [最小包围圆](https://cp-algorithms.com/geometry/enclosing-circle.html)
- (2025 年 5 月 21 日) [模拟退火](https://cp-algorithms.com/num_methods/simulated_annealing.html)
- (2024 年 7 月 12 日) [曼哈顿距离](https://cp-algorithms.com/geometry/manhattan-distance.html)
- (2024 年 6 月 8 日) [背包问题](https://cp-algorithms.com/dynamic_programming/knapsack.html)
- (2024 年 1 月 28 日) [动态规划入门](https://cp-algorithms.com/dynamic_programming/intro-to-dp.html)
- (2023 年 12 月 8 日) [匈牙利算法](https://cp-algorithms.com/graph/hungarian-algorithm.html)
- (2023 年 9 月 10 日) [龟兔赛跑算法](https://cp-algorithms.com/others/tortoise_and_hare.html)
- (2023 年 7 月 12 日) [寻找平面图的面](https://cp-algorithms.com/geometry/planar.html)
- (2023 年 4 月 18 日) [位操作](https://cp-algorithms.com/algebra/bit-manipulation.html)
- (2022 年 10 月 17 日) [二分查找](https://cp-algorithms.com/num_methods/binary_search.html)
- (2022 年 10 月 17 日) [MEX (数组中的最小排除元素)](https://cp-algorithms.com/sequences/mex.html)
- (2022 年 5 月 12 日) [因式分解求幂](https://cp-algorithms.com/algebra/factoring-exp.html)
- (2022 年 5 月 7 日) [Knuth 优化](https://cp-algorithms.com/dynamic_programming/knuth-optimization.html)
- (2022 年 3 月 31 日) [连分数](https://cp-algorithms.com/algebra/continued-fractions.html)
完整的更新列表:[提交历史](https://github.com/cp-algorithms/cp-algorithms/commits/main)
完整的文章列表:[导航](https://cp-algorithms.com/navigation.html)
标签:开源文档, 数据结构, 竞赛编程, 算法, 计算机科学, 逆向工具, 防御加固