Competitive Programming Mastery
This isn’t just another algorithms course. This is a strategic battle plan to take you from solving Div2A problems to crushing Div1 and qualifying for ICPC World Finals. Every chapter is designed with one goal: make you win.
Course Goal: Take you from Newbie (800) to Expert (1600+) on Codeforces and prepare you for ICPC Regionals within 6-12 months of dedicated practice.
The Winning Formula
Most people practice CP wrong. They solve random problems, never upsolve, and wonder why they plateau. Here’s the formula that actually works:Pattern Recognition
80% of CF problems use just 15 core patterns. Master them and you’ll “see” solutions instantly.
Strategic Practice
Solve problems slightly above your level. Use CP-31, Codeforces Problemset filters, and A2OJ ladders.
Upsolving is Everything
Every problem you couldn’t solve in contest is a lesson. Upsolve within 24 hours or you wasted the contest.
Speed + Accuracy
In ICPC, more problems solved always wins. But when tied, lower penalty time breaks it—so speed matters.
The Strategic Approach
The “See the Pattern” Framework
When you read a problem, run through this mental checklist:1
Constraints Analysis (30 seconds)
- n ≤ 20 → Bitmask DP / Brute force
- n ≤ 10³ → O(n²) solutions
- n ≤ 10⁵ → O(n log n) or O(n)
- n ≤ 10⁶ → O(n) only
2
Problem Type Recognition (1 minute)
- “Minimum/Maximum” → DP, Greedy, or Binary Search on Answer
- “Count ways” → DP or Combinatorics
- “Yes/No possible” → Greedy, Graph connectivity, or Binary Search
- “Shortest path” → BFS/Dijkstra
- “Subarray/Substring” → Two Pointers, Sliding Window, or Prefix Sum
3
Pattern Matching (2-3 minutes)
Match to known patterns. If stuck, think: “What’s the simplest version of this problem I can solve?”
4
Edge Cases (Before Coding)
n=1, n=2, all same elements, all different, sorted, reverse sorted, negative numbers.
What Makes This Course Different
Real CF Problems
Every topic has 10+ curated Codeforces problems with difficulty ratings.
Pattern Recognition
We teach you HOW to identify patterns, not just what the patterns are.
Common Mistakes
Every chapter covers the mistakes that cause WA/TLE so you avoid them.
Mental Models
Analogies and visualizations to build intuition, not just memorization.
CP-31 Integration
References to the famous CP-31 sheet for structured practice.
Contest Strategy
Not just algorithms—how to approach a 2-hour contest optimally.
Course Structure: The Rating Ladder
Phase 1: Foundation (Newbie → Pupil: 800-1200)
| Chapter | Topic | Key Patterns | Target Problems |
|---|---|---|---|
| 1 | Time Complexity | Constraint analysis | - |
| 2 | Fast I/O & Templates | Speed optimization | - |
| 3 | STL Mastery | Choosing right data structure | - |
| 4 | Prefix Sum | Range queries | CF 800-1100 |
| 5 | Two Pointers | Sorted arrays, subarrays | CF 800-1200 |
Phase 2: Core Techniques (Pupil → Specialist: 1200-1400)
| Chapter | Topic | Key Patterns | Target Problems |
|---|---|---|---|
| 6 | Binary Search | Search on answer, bounds | CF 1100-1400 |
| 7 | Sorting Strategies | Custom comparators | CF 1100-1300 |
| 8 | Recursion & Backtracking | Subsets, permutations | CF 1200-1400 |
| 9 | Greedy Algorithms | Exchange arguments | CF 1200-1500 |
| 10 | Divide & Conquer | Merge sort pattern | CF 1300-1500 |
Phase 3: Dynamic Programming (Specialist → Expert: 1400-1600)
| Chapter | Topic | Key Patterns | Target Problems |
|---|---|---|---|
| 11 | DP Fundamentals | 1D DP, state design | CF 1300-1600 |
| 12 | DP on Grids & Advanced | 2D DP, bitmask DP | CF 1400-1700 |
Phase 4: Graphs (Expert Level: 1500-1700)
| Chapter | Topic | Key Patterns | Target Problems |
|---|---|---|---|
| 13 | Graph Fundamentals | DFS, BFS, cycles | CF 1300-1600 |
| 14 | Shortest Paths | Dijkstra, Floyd | CF 1400-1700 |
| 15 | Trees | LCA, tree DP | CF 1500-1800 |
Phase 5: Advanced (Expert → Candidate Master: 1600-1900)
| Chapter | Topic | Key Patterns | Target Problems |
|---|---|---|---|
| 16 | Disjoint Set Union | Connectivity, MST | CF 1400-1700 |
| 17 | Segment Trees | Range queries with updates | CF 1500-1900 |
| 18 | String Algorithms | Hashing, KMP, Z-function | CF 1500-1800 |
| 19 | Bit Manipulation | XOR tricks, bitmask | CF 1400-1700 |
| 20 | Contest Strategy | ICPC & CF optimization | - |
The CP-31 Integration
CP-31 is a famous curated problem set that covers all essential topics. Throughout this course, we reference CP-31 problems that align with each chapter:| CP-31 Topic | Our Chapter | Problems |
|---|---|---|
| Implementation | 1-3 | Foundation |
| Prefix Sums | 4 | Range queries |
| Two Pointers | 5 | Subarray problems |
| Binary Search | 6 | Search on answer |
| Greedy | 9 | Optimization |
| DP | 11-12 | All DP patterns |
| Graphs | 13-15 | Traversals, paths, trees |
| Data Structures | 16-17 | DSU, Segment Tree |
| Strings | 18 | Pattern matching |
Practice Resources
Codeforces
Primary platform. Filter problems by rating and tags. Participate in every contest.
CSES Problem Set
300 classic problems. Perfect for pattern practice.
AtCoder
Clean problems. Great for math and DP.
CP-31 Sheet
Curated topic-wise problems for systematic practice.
Essential Tools & Extensions
| Tool | Purpose | Link |
|---|---|---|
| Competitive Companion | Parse problems to IDE | Chrome |
| CF-Predictor | Predict rating changes | Chrome Extension |
| Carrot | Rating predictor (alternate) | Chrome |
| CPH (VS Code) | Auto testing in VS Code | VS Code Extension |
| A2OJ Ladders | Rating-based problem lists | A2OJ |
| CF Visualizer | Analyze your stats | cfviz |
Recommended Problem Lists
CSES 300
Complete the entire CSES problemset. Covers all fundamentals.
Striver's CP Sheet
450 curated problems for placement prep.
Junior Training Sheet
500 problems from 800 to 1600 rating.
The Mindset of Champions
Weekly Practice Schedule (Recommended)
| Day | Activity |
|---|---|
| Mon-Wed | Solve 3-5 problems/day from current topic |
| Thu | Virtual contest (past Div2) |
| Fri | Upsolve Thursday’s contest |
| Sat | Live Codeforces contest |
| Sun | Upsolve + Review mistakes |
Let’s Begin Your Journey
8-Week Roadmap to Specialist
Structured weekly plan to go from LeetCode solver to CF Specialist (1400+).
Codeforces Survival Guide
Everything LeetCode users need to know about CF—ratings, contests, I/O.
Setup Your Environment
Configure VS Code, templates, and tools for competitive programming.
Contest Strategy
Master the meta-skills that separate winners from participants.
Quick Links
| Resource | Description |
|---|---|
| Upsolving Guide | How to learn from every problem |
| Debugging Guide | Find bugs faster with systematic debugging |
| CF Problem Types | Recognize common CF problem patterns |
| Code Library | Ready-to-use algorithm implementations |
| Quick Reference | One-page cheat sheet for contests |