算法竞赛模板库 by 灵茶山艾府 💭💡🎈
See the code由于算法知识点繁杂,将自己学习到的算法、做过的题目分类整理好是有必要的。
一个算法模板应当涵盖以下几点:
欢迎关注 B站@灵茶山艾府
这一阶段主要目标是提高对问题的观察能力。做构造题可以针对性地训练这一点。
选择难度在自己 rating 到 rating+200 范围内的构造题 (tag: constructive algorithms),按照过题人数降序做题,比如 [1700,1900] 区间的就是下面这个链接:
https://codeforces.com/problemset?order=BY_SOLVED_DESC&tags=constructive+algorithms%2C1700-1900
通过大量的构造题训练,提高观察能力,快速找到切题入口。具体见我在知乎上的这篇 回答。
见识更高的山、更广的海。
按人数从高到低,做 2200+ 的题目。建议不设置难度上限!由于按人数排序,难度分不会太高,不设上限可以避免错过高分好题。
我的 Codeforces 账号
编写一个 run(io.Reader, io.Writer) 函数来处理输入输出。这样写的理由是:
main 中调用 run(os.Stdin, os.Stdout) 来执行代码;strings.Reader 当作输入,并用一个 strings.Builder 来接收输出,将这二者传入 run 中,然后就能比较输出与答案了;runAC,参数和 run 一样。通过 随机数据生成器 来生成数据,分别传入 runAC 和 run,通过比对各自的输出,来检查 run 中的问题。具体可以见 Codeforces 代码仓库 main,所有非交互题的代码及其对应测试全部按照上述框架实现。
交互题的写法要复杂一些,需要把涉及输入输出的地方抽象成接口,详见 interactive_problem。
注:由于入门经典上选了很多区域赛的题,一部分题目可以在 GYM 上找到,这样可以就可以用 Go 编程提交了。
算法竞赛 (ICPC, OI, etc) 论文,课件,文档,笔记等
The Ultimate Topic List (with Resources, Problems and Templates)
A Huge Update on The Ultimate Topic List
All the good tutorials found for Competitive Programming
The Ultimate Topic List(with Tutorials, Problems, and Templates)
https://github.com/hh2048/XCPC 含 jiangly 模板
https://www.cnblogs.com/alex-wei/p/contents.html
Links of ICPC/CCPC Contests from China
[meme] If you know at least 3 of these things and you are not red — you are doing it wrong. Stop learning useless algorithms, go and solve some problems, learn how to use binary search.
https://blog.csdn.net/calabash_boy/article/details/79973483
https://github.com/zimpha/algorithmic-library
https://www.luogu.com.cn/blog/command-block/blog-suo-yin-zhi-ding-post
https://www.luogu.com.cn/blog/Troverld/index
My GoLand Live Templates and Postfix Completion settings
Another Codeforces Solve Tracker
AtCoder-Codeforces Rating converter
How to Interpret Contest Ratings
Codeforces: Problem Difficulties
Latest release
Releases this year
(top 24 of 34)
7,556 followers · starred Dec 2025
2,850 followers · starred Jul 2022
367 followers · starred May 2022
249 followers · starred Jan 2025
算法竞赛模板库 by 灵茶山艾府 💭💡🎈
See the code由于算法知识点繁杂,将自己学习到的算法、做过的题目分类整理好是有必要的。
一个算法模板应当涵盖以下几点:
欢迎关注 B站@灵茶山艾府
这一阶段主要目标是提高对问题的观察能力。做构造题可以针对性地训练这一点。
选择难度在自己 rating 到 rating+200 范围内的构造题 (tag: constructive algorithms),按照过题人数降序做题,比如 [1700,1900] 区间的就是下面这个链接:
https://codeforces.com/problemset?order=BY_SOLVED_DESC&tags=constructive+algorithms%2C1700-1900
通过大量的构造题训练,提高观察能力,快速找到切题入口。具体见我在知乎上的这篇 回答。
见识更高的山、更广的海。
按人数从高到低,做 2200+ 的题目。建议不设置难度上限!由于按人数排序,难度分不会太高,不设上限可以避免错过高分好题。
我的 Codeforces 账号
编写一个 run(io.Reader, io.Writer) 函数来处理输入输出。这样写的理由是:
main 中调用 run(os.Stdin, os.Stdout) 来执行代码;strings.Reader 当作输入,并用一个 strings.Builder 来接收输出,将这二者传入 run 中,然后就能比较输出与答案了;runAC,参数和 run 一样。通过 随机数据生成器 来生成数据,分别传入 runAC 和 run,通过比对各自的输出,来检查 run 中的问题。具体可以见 Codeforces 代码仓库 main,所有非交互题的代码及其对应测试全部按照上述框架实现。
交互题的写法要复杂一些,需要把涉及输入输出的地方抽象成接口,详见 interactive_problem。
注:由于入门经典上选了很多区域赛的题,一部分题目可以在 GYM 上找到,这样可以就可以用 Go 编程提交了。
算法竞赛 (ICPC, OI, etc) 论文,课件,文档,笔记等
The Ultimate Topic List (with Resources, Problems and Templates)
A Huge Update on The Ultimate Topic List
All the good tutorials found for Competitive Programming
The Ultimate Topic List(with Tutorials, Problems, and Templates)
https://github.com/hh2048/XCPC 含 jiangly 模板
https://www.cnblogs.com/alex-wei/p/contents.html
Links of ICPC/CCPC Contests from China
[meme] If you know at least 3 of these things and you are not red — you are doing it wrong. Stop learning useless algorithms, go and solve some problems, learn how to use binary search.
https://blog.csdn.net/calabash_boy/article/details/79973483
https://github.com/zimpha/algorithmic-library
https://www.luogu.com.cn/blog/command-block/blog-suo-yin-zhi-ding-post
https://www.luogu.com.cn/blog/Troverld/index
My GoLand Live Templates and Postfix Completion settings
Another Codeforces Solve Tracker
AtCoder-Codeforces Rating converter
How to Interpret Contest Ratings
Codeforces: Problem Difficulties
Latest release
Releases this year
(top 24 of 34)
7,556 followers · starred Dec 2025
2,850 followers · starred Jul 2022
367 followers · starred May 2022
249 followers · starred Jan 2025