A complete, structured guide to competitive programming using C++. This repository takes you from writing your first solution to solving expert-level problems on Codeforces, CSES, and AtCoder.
- You know basic programming but have never done competitive programming
- You have tried CP but feel stuck and don't know what to learn next
- You want a clear, step-by-step path instead of random practice
- 100 fully solved problems with clean C++ code and plain-English explanations
- 200+ practice problems handpicked from CSES, Codeforces, and AtCoder
- 10 topic guides that teach you the concepts before throwing problems at you
- A structured roadmap so you always know what to do next
- Start with C++ Basics for CP if you need a refresher
- Follow the Roadmap for the recommended learning order
- For each topic, read the concept guide first, then solve the problems
- Try every solved problem yourself before reading the solution
- After solved problems, work through the practice problems on your own
| # | Topic | Solved | Practice | Difficulty |
|---|---|---|---|---|
| 1 | Implementation & Ad-Hoc | 12 | 20 | Beginner |
| 2 | Sorting & Searching | 12 | 22 | Beginner-Intermediate |
| 3 | Greedy Algorithms | 8 | 18 | Beginner-Intermediate |
| 4 | Number Theory & Math | 10 | 20 | Intermediate |
| 5 | Dynamic Programming | 15 | 30 | Intermediate-Advanced |
| 6 | Graph Algorithms | 15 | 30 | Intermediate-Advanced |
| 7 | Tree Algorithms | 8 | 20 | Advanced |
| 8 | Range Queries | 8 | 20 | Advanced |
| 9 | String Algorithms | 6 | 15 | Advanced |
| 10 | Advanced Topics | 6 | 15 | Expert |
Total: 100 solved + 210 practice = 310 problems
- Never look at the solution before trying for at least 30 minutes. Struggling is where the learning happens.
- If you can't solve it in 2 hours, read the hint/editorial. Don't waste entire days on one problem.
- After reading a solution, close it and code it yourself from scratch. Copy-pasting teaches nothing.
- Upsolve every contest. After each contest, solve the first problem you couldn't get. This is the fastest way to improve.
- Track your mistakes. Keep a simple note of problems you got wrong and why. Review it weekly.
| Platform | Best For | Link |
|---|---|---|
| CSES | Standard algorithm problems | cses.fi/problemset |
| Codeforces | Live contests + huge problem archive | codeforces.com |
| AtCoder | Clean problems, great for beginners | atcoder.jp |
| Your Level | Target Rating | Estimated Time |
|---|---|---|
| Complete beginner | Codeforces Pupil (1200) | 3-6 months |
| Pupil | Specialist (1400) | 2-4 months |
| Specialist | Expert (1600) | 4-12 months |
These estimates assume 2-3 hours of daily practice and regular contest participation.
See resources.md for books, video channels, external sheets, and other helpful links.
Built with the goal of making competitive programming accessible to everyone. Good luck on your journey.