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.- 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
Week-by-Week Breakdown
Week 1: CF Environment & Speed
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
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)
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
Week 2: Implementation, Simulation & Basic Bitwise
Day 1-2: Implementation Fundamentals
- String manipulation
- Array operations
- Simulation problems
- Following instructions precisely
Day 3-4: Common Patterns
- Frequency counting with maps
- Finding min/max
- Working with pairs
- Coordinate problems
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)
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
Week 3: Math & Number Theory Basics
Day 1-2: Divisibility & GCD
- Divisibility rules
- GCD/LCM calculations
- Prime checking
- Factor counting
Day 3-4: Modular Arithmetic
- Why we use MOD = 10^9 + 7
- Modular addition, subtraction, multiplication
- Avoiding overflow
- Power function with mod
Day 5-7: Practice
- Solve 15 math-tagged problems (800-1000)
- 1 virtual contest
- Focus on problems with “math” or “number theory” tags
Week 4: Sorting & Greedy
Day 1-2: Sorting Techniques
- Custom comparators
- Sorting pairs/tuples
- Sorting with indices
- Coordinate compression
Day 3-5: Greedy Algorithms
- When greedy works
- Exchange argument
- Interval scheduling
- Greedy + sorting combo
Day 6-7: Contest + Upsolve
- 1 virtual Div 2 contest (attempt A, B, C)
- Upsolve aggressively
Week 5: Binary Search & Two Pointers
Day 1-2: Binary Search Fundamentals
- Binary search on sorted array
- Lower bound, upper bound
- Binary search on answer
Day 3-4: Two Pointers
- Two pointers on sorted arrays
- Sliding window
- Subarray problems
Day 5-7: Prefix Sums
- 1D prefix sum
- Difference arrays
- Range sum queries
Week 6: Graphs Basics
Day 1-2: Graph Representation
- Adjacency list
- Reading graph input
- Directed vs undirected
Day 3-4: DFS & BFS
- DFS for connectivity
- BFS for shortest path (unweighted)
- Connected components
- Cycle detection
Day 5-7: Grid Graphs
- BFS on grids
- Flood fill
- 4-directional vs 8-directional
- Practice + contest
Week 7: Dynamic Programming Introduction
Day 1-2: DP Fundamentals
- What is DP? (Memoization vs Tabulation)
- State and transition
- Classic problems: Fibonacci, Climbing Stairs
Day 3-4: 1D DP Patterns
- Coin change
- LIS (Longest Increasing Subsequence)
- Subset sum
- Unbounded knapsack
Day 5-7: Practice DP
- Solve 10 DP problems from CSES/AtCoder
- Focus on state design
- 1 virtual contest
Week 8: Contest Strategy & Consolidation
Day 1-2: Contest Strategy
- Time management
- When to skip problems
- Reading problems effectively
- Handling pressure
Day 3-4: Common Mistake Review
- Review all WA/TLE submissions
- Create personal mistake log
- Identify patterns in your errors
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
Week 10: Data Structures
Week 11: Advanced Topics & Expert Push
Daily Schedule Template
Progress Tracking
Rating Milestones
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)