8-Week Roadmap: LeetCode to CF Specialist
Who This Is For
You’ve solved LeetCode problems. You understand basic DSA. But Codeforces feels like a different universe—weird I/O, tight time limits, cryptic problem statements, and ratings that make no sense. This roadmap bridges that gap.Goal: Reach Specialist (1400+) in 8 weeks, then Expert (1600+) in 3 more weeks.Prerequisites:
- Solved 100+ LeetCode problems (Easy/Medium)
- Know basic data structures (arrays, stacks, queues, trees)
- Understand Big O notation
- Can code in C++ (or willing to switch)
The LeetCode → Codeforces Gap
| Aspect | LeetCode | Codeforces |
|---|---|---|
| I/O | Function signature given | Read from stdin, print to stdout |
| Time Limit | Generous (often 1-2s) | Tight (1-2s for 10^6 operations) |
| Problem Style | Clear, structured | Story-based, need to extract problem |
| Test Cases | Run before submit | Pretests only, system tests after |
| Edge Cases | Often handled | Will fail you brutally |
| Speed | Accuracy matters | Speed + Accuracy both matter |
| Multiple Tests | Usually single | Often T test cases in one run |
Week-by-Week Breakdown
Week 1: CF Environment & Speed
1
Day 1-2: Setup
- Set up VS Code with CP extensions
- Create your template
- Learn
ios::sync_with_stdio(false)andcin.tie(nullptr) - Practice fast I/O patterns
2
Day 3-4: CF Problem Format
- Solve 10 problems rated 800
- Focus on reading problems correctly
- Get used to multiple test cases
- Learn to handle edge cases (n=1, empty input)
3
Day 5-7: First Virtual Contest
- Do 2-3 virtual Div 4 contests (easier than Div 3, perfect for CF beginners)
- Focus on solving A, B, C, D
- Time yourself strictly (2 hours)
- Upsolve everything you couldn’t solve
- Get familiar with CF interface, submission system, and verdicts
| Problem | Rating | Focus |
|---|---|---|
| Watermelon | 800 | Basic logic |
| Way Too Long Words | 800 | Strings |
| Team | 800 | Counting |
| Stones on the Table | 800 | Simulation |
| Beautiful Matrix | 800 | 2D arrays |
| Domino piling | 800 | Math basics |
| Next Round | 800 | Counting |
| Boy or Girl | 800 | Strings |
| Word | 800 | String manipulation |
| String Task | 800 | Strings |
Week 2: Implementation, Simulation & Basic Bitwise
1
Day 1-2: Implementation Fundamentals
- String manipulation
- Array operations
- Simulation problems
- Following instructions precisely
2
Day 3-4: Common Patterns
- Frequency counting with maps
- Finding min/max
- Working with pairs
- Coordinate problems
3
Day 5-6: Basic Bitwise Operations
- Understanding AND, OR, XOR
- Checking if a number is odd/even using
& - Bit shifting basics (
<<,>>) - Checking/Setting specific bits
- XOR properties (a ^ a = 0, a ^ 0 = a)
4
Day 7: Practice + Contest
- 1-2 virtual Div 3 contests (step up from Div 4)
- Focus on solving A, B, C problems
- Upsolve all problems you couldn’t solve
| Problem | Rating | Concept |
|---|---|---|
| Translation | 800 | String reversal |
| Football | 900 | Consecutive counting |
| Die Roll | 800 | Probability/counting |
| Gravity Flip | 900 | Simulation + Sorting |
| Bit++ | 800 | Simulation |
| Vanya and Fence | 800 | Conditional counting |
| Lucky Division | 1000 | Divisibility |
| Even Odds | 900 | Math pattern/parity |
| Ultra-Fast Mathematician | 800 | XOR basics |
| Wizard of Orz | 900 | Pattern recognition |
Week 3: Math & Number Theory Basics
1
Day 1-2: Divisibility & GCD
- Divisibility rules
- GCD/LCM calculations
- Prime checking
- Factor counting
2
Day 3-4: Modular Arithmetic
- Why we use MOD = 10^9 + 7
- Modular addition, subtraction, multiplication
- Avoiding overflow
- Power function with mod
3
Day 5-7: Practice
- Solve 15 math-tagged problems (800-1000)
- 1 virtual contest
- Focus on problems with “math” or “number theory” tags
| Problem | Rating | Concept |
|---|---|---|
| Nearly Lucky Number | 800 | Digit counting |
| Anton and Danik | 800 | Counting |
| Insomnia cure | 800 | Divisibility |
| Even Odds | 900 | Math pattern |
| Petya and Strings | 800 | String comparison |
Week 4: Sorting & Greedy
1
Day 1-2: Sorting Techniques
- Custom comparators
- Sorting pairs/tuples
- Sorting with indices
- Coordinate compression
2
Day 3-5: Greedy Algorithms
- When greedy works
- Exchange argument
- Interval scheduling
- Greedy + sorting combo
3
Day 6-7: Contest + Upsolve
- 1 virtual Div 2 contest (attempt A, B, C)
- Upsolve aggressively
| Problem | Rating | Concept |
|---|---|---|
| Helpful Maths | 800 | Sorting basics |
| Presents | 800 | Inverse permutation |
| Queue at the School | 900 | Simulation |
| Bear and Big Brother | 800 | Simulation/Math |
| Array | 900 | Sorting + Greedy |
Week 5: Binary Search & Two Pointers
1
Day 1-2: Binary Search Fundamentals
- Binary search on sorted array
- Lower bound, upper bound
- Binary search on answer
2
Day 3-4: Two Pointers
- Two pointers on sorted arrays
- Sliding window
- Subarray problems
3
Day 5-7: Prefix Sums
- 1D prefix sum
- Difference arrays
- Range sum queries
| Problem | Rating | Concept |
|---|---|---|
| Worms | 1200 | Binary Search |
| Books | 1400 | Two Pointers |
| Number of Segments with Big Sum | 1100 | Two Pointers |
| Frog Jumps | 1100 | Binary Search |
| Yet Another Counting Problem | 1300 | Prefix Sum |
Week 6: Graphs Basics
1
Day 1-2: Graph Representation
- Adjacency list
- Reading graph input
- Directed vs undirected
2
Day 3-4: DFS & BFS
- DFS for connectivity
- BFS for shortest path (unweighted)
- Connected components
- Cycle detection
3
Day 5-7: Grid Graphs
- BFS on grids
- Flood fill
- 4-directional vs 8-directional
- Practice + contest
| Problem | Rating | Concept |
|---|---|---|
| Counting Rooms | ~1200 | Flood Fill |
| Labyrinth | ~1300 | BFS Path |
| Building Roads | ~1200 | Components |
| King Escape | 1000 | Grid BFS |
| Lakes in Berland | 1600 | Flood Fill |
Week 7: Dynamic Programming Introduction
1
Day 1-2: DP Fundamentals
- What is DP? (Memoization vs Tabulation)
- State and transition
- Classic problems: Fibonacci, Climbing Stairs
2
Day 3-4: 1D DP Patterns
- Coin change
- LIS (Longest Increasing Subsequence)
- Subset sum
- Unbounded knapsack
3
Day 5-7: Practice DP
- Solve 10 DP problems from CSES/AtCoder
- Focus on state design
- 1 virtual contest
| Problem | Rating | Concept |
|---|---|---|
| Dice Combinations | ~1200 | 1D DP |
| Minimizing Coins | ~1300 | Coin Change |
| Coin Combinations I | ~1300 | Counting |
| Boredom | 1500 | DP |
| Vacation | ~1300 | 2D DP |
Week 8: Contest Strategy & Consolidation
1
Day 1-2: Contest Strategy
- Time management
- When to skip problems
- Reading problems effectively
- Handling pressure
2
Day 3-4: Common Mistake Review
- Review all WA/TLE submissions
- Create personal mistake log
- Identify patterns in your errors
3
Day 5-7: Contest Blitz
- 3 virtual Div 2 contests
- Aim for A, B, C solved
- Upsolve D problems
- Participate in 1 live contest
Week 9-11: Road to Expert (+3 Weeks)
Week 9: Advanced DP & Trees
| Day | Focus | Problems |
|---|---|---|
| 1-2 | 2D DP, Grid DP | DP on Grids |
| 3-4 | Tree basics, Tree DP | Trees |
| 5-7 | Practice + Contest | 2 virtual contests |
Week 10: Data Structures
| Day | Focus | Problems |
|---|---|---|
| 1-2 | DSU (Union-Find) | DSU |
| 3-4 | Segment Tree basics | Segment Trees |
| 5-7 | Practice + Contest | Focus on 1400-1600 problems |
Week 11: Advanced Topics & Expert Push
| Day | Focus | Problems |
|---|---|---|
| 1-2 | Bit manipulation | Bit Manipulation |
| 3-4 | String basics | Strings |
| 5-7 | Contest marathon | 3 virtual contests, 1-2 live contests |
Daily Schedule Template
Progress Tracking
Rating Milestones
| Week | Expected Rating | Problems Solved | Key Skill |
|---|---|---|---|
| 1 | 800-900 | 20 | CF format comfortable |
| 2 | 900-1000 | 45 | Implementation solid |
| 3 | 1000-1100 | 65 | Math basics done |
| 4 | 1100-1200 | 85 | Greedy intuition |
| 5 | 1150-1250 | 105 | Binary search mastered |
| 6 | 1200-1300 | 120 | Graphs basics |
| 7 | 1250-1350 | 135 | DP started |
| 8 | 1300-1400 | 150 | Specialist! |
| 11 | 1500-1600 | 200 | Expert! |
Self-Assessment Checklist
After 8 weeks, you should be able to:- Solve CF Div2 A in under 5 minutes
- Solve CF Div2 B in under 15 minutes
- Attempt CF Div2 C with reasonable approach
- Write fast I/O template from memory
- Implement DFS/BFS without looking up
- Recognize greedy vs DP problems
- Debug using stress testing
- Read problems carefully (no silly WAs)
Common Pitfalls to Avoid
Resources for Each Week
| Week | Primary Resource | Backup Resource |
|---|---|---|
| 1 | This course + CF 800 | USACO Guide |
| 2 | CF 800-900 problems | AtCoder Beginner |
| 3 | CF Math problems | CSES Math section |
| 4 | CF Greedy + Sorting | CSES Sorting |
| 5 | CSES Searching | CF Binary Search tag |
| 6 | CSES Graph | CF DFS/BFS tag |
| 7 | AtCoder DP Contest | CSES DP section |
| 8 | Virtual contests | Past Div 2 rounds |