Resources & Roadmap — Newbie to Grandmaster
This is the final post of the entire Competitive Programming Math series. Over 12 modules and dozens of posts we covered everything from basic number theory to game theory, geometry, and contest strategy. Now it is time to zoom out: what resources exist, how to use them, and how to chart a path from beginner to Grandmaster.
Whether you are just starting out or you are an Expert looking to break into Master, this post is your compass. Bookmark it. Come back to it every few months as you level up.
Essential Books
Books give you structured, deep knowledge that random editorials cannot match.
1. Competitive Programming 3 / 4 — Steven & Felix Halim
The de facto textbook of the competitive programming community. CP3 covers data structures, algorithms, mathematics, string processing, and geometry in a problem-driven style. Every topic comes with a curated list of UVa Online Judge problems so you can practice immediately.
Best for: Beginners to Intermediate (Codeforces 1000–1800). Read it cover to cover during your first year.
Tip: CP4 (2020) is a two-volume update with modern problems and expanded coverage of advanced topics like network flow and NTT. Get CP4 if available; fall back to CP3 otherwise.
2. Competitive Programmer's Handbook — Antti Laaksonen
A freely available PDF (also known as the "CSES Book") that covers most of the standard competitive programming curriculum in 300 pages. It is concise, clean, and pairs perfectly with the CSES Problem Set.
Best for: Beginners who want a fast, free introduction. Also excellent as a quick reference during contest prep.
Link: cses.fi/book/book.pdf
3. Introduction to Algorithms (CLRS) — Cormen, Leiserson, Rivest, Stein
The classic algorithms textbook. It is not competitive-programming-specific, but if you want deep understanding of algorithm design, correctness proofs, and amortized analysis, CLRS is unmatched. Chapters on graph algorithms, DP, and number theory are especially relevant.
Best for: Intermediate to Advanced (1600+). Use it as a reference, not a cover-to-cover read. When you encounter a topic you don't fully understand — say, max-flow or amortized analysis — CLRS gives you the rigorous foundation.
4. Art of Problem Solving (AoPS) Books
The AoPS series (Introduction to Counting and Probability, Intermediate Algebra, etc.) builds mathematical maturity. Competitive programming is at least 40% math, and AoPS trains the kind of creative problem-solving that transfers directly to contest math problems — combinatorics, number theory, inequalities.
Best for: Anyone who feels their mathematical intuition is the bottleneck. Especially useful for IOI-track contestants.
5. Honourable Mentions
- Guide to Competitive Programming (Laaksonen, Springer) — extended CSES Handbook.
- Algorithms (Jeff Erickson) — free, outstanding for graph algorithms and DP.
- Concrete Mathematics (Graham, Knuth, Patashnik) — deep discrete math and generating functions.
Online Judges & Platforms
You learn competitive programming by solving problems. Here is where to do it.
Codeforces
The undisputed center of CP. Rated contests 2–3 times per week (Div 1–4), 9000+ problems, editorials for every round, and a vibrant blog community.
Pros: Largest archive, reliable rating, active community.
Cons: Server issues during big rounds; overwhelming for beginners.
AtCoder
Japanese platform with beautifully crafted problems. ABCs are great for learning; AGCs are among the hardest contests in the world. Especially strong on math topics.
Pros: Highest problem quality, clean judge.
Cons: Smaller English community; Asian time zones.
CSES
~300 curated problems organized by topic. Companion to the CP Handbook. Covers every standard algorithm through Expert level. No contests — pure practice.
USACO
Monthly contests with 4 divisions (Bronze–Platinum). Excellent official analyses and a clear difficulty progression. The go-to for IOI-track preparation.
Kattis
Archives real ICPC regional and World Finals problems. Great for team practice.
LeetCode — Why It's Different
Primarily an interview prep platform. Problems are simpler, time limits generous, focus on breadth not depth. Use for job prep, not CP improvement.
Curated Problem Lists
A curated list solves the "what do I practice next?" problem.
1. CSES Problem Set
cses.fi/problemset — ~300 problems organized into categories: Sorting, DP, Graph, Tree, Math, String, Geometry, Advanced. Solve them in order within each category. If you complete the entire CSES set, you have solid coverage of every standard algorithm.
Target rating: to
2. A2OJ Ladders (archived)
Originally at a2oj.com, now archived on GitHub and various mirrors. These are Codeforces problems grouped by difficulty. Each "ladder" is a set of ~100 problems at a specific rating band. Solve the ladder at your current rating, then move up.
Target rating: to
3. Mostafa Saad's CF Sheet
A massive spreadsheet of Codeforces problems organized by topic and difficulty. Comes in multiple levels (C1 through C8). Each level has hundreds of problems with tags. This is one of the most comprehensive training resources available.
Target rating: to
4. Junior Training Sheet
Created by Assiut University ICPC community. ~950 problems from Codeforces targeting beginners and low-intermediates. Great if you are under 1400 and want a structured training plan.
Target rating: to
5. Codeforces EDU & USACO Guide
CF EDU — Step-by-step courses on Binary Search, Two Pointers, Segment Trees, DSU, and more. Each course has video explanations followed by practice problems of increasing difficulty.
usaco.guide — A free curriculum with explanations and problem lists for every topic from Bronze through Platinum. Even non-USACO competitors benefit from the curation.
Target rating: to
The Roadmap: Newbie to Grandmaster
Here is a phase-by-phase plan. Rating ranges are for Codeforces, but the skill progression applies universally. Timelines vary — the order matters more than speed.
— Newbie to Pupil (0–1200)
Duration: 1–3 months | Focus: Fundamentals
What to learn:
- A programming language (C++ strongly recommended)
- Basic I/O, loops, conditionals, arrays, strings
- Simple math: GCD, modular arithmetic, prime checking
- Sorting and searching (built-in sort, binary search)
- Brute force and complete search
- Basic STL:
vector,map,set,pair
What to practice:
- Codeforces Div 3/4 contests (A and B problems)
- CSES Introductory Problems and Sorting section
- First 50 problems of the Junior Training Sheet
— Pupil to Specialist (1200–1600)
Duration: 2–6 months | Focus: Standard Algorithms
What to learn:
- Graph basics: BFS, DFS, connected components, topological sort
- Dynamic programming basics: knapsack, LIS, grid DP, bitmask DP intro
- Greedy algorithms and sorting-based solutions
- Two pointers and sliding window
- Binary search on the answer
- Basic number theory: sieve of Eratosthenes, modular exponentiation
- Prefix sums, difference arrays
- Stack and queue tricks (monotonic stack, next greater element)
What to practice:
- Codeforces Div 2 contests (A, B, C problems)
- CSES Graph and DP sections
- A2OJ ladder for 1200–1400, then 1400–1600
— Specialist to Expert (1600–1900)
Duration: 3–12 months | Focus: Advanced Techniques
What to learn:
- Segment trees (point update, range query, lazy propagation)
- Advanced DP: digit DP, DP on trees, DP with bitmasks
- Number theory: Euler's totient, Möbius function, CRT
- Disjoint Set Union (DSU) with path compression and union by rank
- Shortest paths: Dijkstra, Bellman-Ford, Floyd-Warshall
- Combinatorics: nCr with modular inverse, inclusion-exclusion
- String algorithms: KMP, Z-algorithm, hashing
What to practice:
- Codeforces Div 2 (C, D problems) and Div 1 (A problems)
- CSES Tree and Advanced sections
- Codeforces EDU segment tree course
- AtCoder ABC problems E and F
— Expert to Master (1900–2200)
Duration: 6–18 months | Focus: Hard Problems & Combinations
What to learn:
- Advanced graph: max-flow, min-cost flow, bipartite matching
- Heavy-light decomposition, centroid decomposition
- Persistent segment tree, merge sort tree, Li Chao tree
- FFT/NTT for polynomial multiplication
- Game theory: Sprague-Grundy, Nim variants
- Geometry: convex hull, line sweep, half-plane intersection
Practice: CF Div 1 (A, B), ARC/AGC, virtual contests, upsolve 1–2 levels above comfort zone.
— Master to Grandmaster (2200–2400+)
Duration: 1–3+ years | Focus: Originality & Deep Expertise
What to learn:
- Research-level: matroid intersection, link-cut trees, suffix automaton
- Advanced math: generating functions, Burnside/Pólya, analytic combinatorics
- Obscure DP optimizations: Knuth, divide-and-conquer, aliens trick
- Original observation — many GM-level problems need an insight not in any textbook
- Speed and accuracy under pressure
Practice: CF Div 1 (B–D), AGC, IOI/ICPC World Finals archives. Create your own problems.
Here is a compact summary of the rating milestones:
YouTube Channels & Blogs
Video and blog content is invaluable for techniques that are hard to grasp from text.
Errichto (YouTube)
Kamil Debowski (LGM on CF) produces contest screencasts, algorithm tutorials, and streams. His "How to start CP" series is the best onboarding resource on YouTube. Watch his screencasts to learn how top competitors think in real time.
SecondThread (YouTube)
William Lin provides post-contest analyses and deep-dives into segment trees, centroid decomposition, and other advanced topics. Best for 1600+.
Colin Galen (YouTube)
Focuses on CP meta-skills: how to practice, think about problems, and break through plateaus. His advice on deliberate practice is some of the best available.
neal's blog
neal on CF — International Grandmaster who writes some of the cleanest C++ in the community. Essential reading for anyone who wants faster, cleaner code.
Essential Codeforces Blogs
- "An awesome list for competitive programming" — a frequently updated meta-list of resources.
- "DP optimizations" — Knuth, divide-and-conquer DP, LCHT, aliens trick.
- "C++ tricks for competitive programming" — pragmas, fast I/O, useful macros.
- "Way to go from rating 1000 to 2000+" — detailed roadmap with problem links.
Building Your Own Resources
The highest level of understanding comes from teaching.
Start a Blog or Editorial Repository
After solving a problem with an interesting technique, write up your thought process. A GitHub repo with markdown files works perfectly. The act of explaining forces you to fill in gaps in your understanding. Structure each editorial like this:
Write Editorials & Teach Others
After each contest, write editorials for problems you solved — and attempt writeups for ones you couldn't (after reading the official editorial). Mentor beginners in your university's CP club. Answer questions on Codeforces blogs. Every time you explain a concept, you reinforce it and discover subtleties you missed.
Create Your Own Problems
Problem setting dramatically improves solving ability. You must think about intended solutions vs. wrong approaches, edge cases, test generators, and complexity bounds. Start by creating variations of solved problems, then test on Polygon.
Final Words
We have covered a lot of ground — not just in this post, but across the entire 13-module series. From GCD and modular arithmetic in Module 1 to game theory, geometry, and contest strategy, you now have a complete mathematical toolkit for competitive programming. But here's the thing: the journey matters more than the destination.
The goal isn't just to reach Grandmaster. The real value of competitive programming lies in what it teaches you:
- Rigorous thinking. You learn to be precise about what you know and what you assume.
- Problem decomposition. Every hard problem is a combination of simpler subproblems. CP trains you to see that structure.
- Resilience. You will get stuck. You will fail contests. You will feel like you aren't improving. And then, one day, a problem that would have been impossible six months ago falls in fifteen minutes. That's growth.
- Community. Competitive programming has one of the most supportive and intellectually vibrant communities in computing. The friends and connections you make along the way are priceless.
- Transferable skills. The algorithms, data structures, and mathematical reasoning you develop here transfer directly to software engineering, machine learning, research, and any field that requires structured problem solving.
To close out the series, here is a small C++ program — a "hello world" of competitive programming. Read, think, solve, output. Just like the thousands of solutions you will write on your journey.
"The expert in anything was once a beginner." — Helen Hayes
Good luck on your journey. See you on the leaderboard. 🏆