Skip to main content

8-Week Roadmap: LeetCode to CF Specialist

8-Week Roadmap to 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

AspectLeetCodeCodeforces
I/OFunction signature givenRead from stdin, print to stdout
Time LimitGenerous (often 1-2s)Tight (1-2s for 10^6 operations)
Problem StyleClear, structuredStory-based, need to extract problem
Test CasesRun before submitPretests only, system tests after
Edge CasesOften handledWill fail you brutally
SpeedAccuracy mattersSpeed + Accuracy both matter
Multiple TestsUsually singleOften 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) and cin.tie(nullptr)
  • Practice fast I/O patterns
Read: Environment Setup
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)
Practice: CF 800 Problems
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
Weekly Target: 20 problems solved, 2-3 virtual Div 4 contests Problems to Target This Week:
ProblemRatingFocus
Watermelon800Basic logic
Way Too Long Words800Strings
Team800Counting
Stones on the Table800Simulation
Beautiful Matrix8002D arrays
Domino piling800Math basics
Next Round800Counting
Boy or Girl800Strings
Word800String manipulation
String Task800Strings

Week 2: Implementation, Simulation & Basic Bitwise

1

Day 1-2: Implementation Fundamentals

  • String manipulation
  • Array operations
  • Simulation problems
  • Following instructions precisely
Read: Fast I/O & Templates
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)
Read: Bit Manipulation
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
Weekly Target: 25 problems (800-1000), 1-2 virtual Div 3 contests Concept-Focused Problems:
ProblemRatingConcept
Translation800String reversal
Football900Consecutive counting
Die Roll800Probability/counting
Gravity Flip900Simulation + Sorting
Bit++800Simulation
Vanya and Fence800Conditional counting
Lucky Division1000Divisibility
Even Odds900Math pattern/parity
Ultra-Fast Mathematician800XOR basics
Wizard of Orz900Pattern 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
Weekly Target: 20 problems (800-1000), understand mod arithmetic Key Problems:
ProblemRatingConcept
Nearly Lucky Number800Digit counting
Anton and Danik800Counting
Insomnia cure800Divisibility
Even Odds900Math pattern
Petya and Strings800String comparison

Week 4: Sorting & Greedy

1

Day 1-2: Sorting Techniques

  • Custom comparators
  • Sorting pairs/tuples
  • Sorting with indices
  • Coordinate compression
Read: Sorting Strategies
2

Day 3-5: Greedy Algorithms

  • When greedy works
  • Exchange argument
  • Interval scheduling
  • Greedy + sorting combo
Read: Greedy Algorithms
3

Day 6-7: Contest + Upsolve

  • 1 virtual Div 2 contest (attempt A, B, C)
  • Upsolve aggressively
Weekly Target: 20 problems (900-1100), master greedy intuition Key Problems:
ProblemRatingConcept
Helpful Maths800Sorting basics
Presents800Inverse permutation
Queue at the School900Simulation
Bear and Big Brother800Simulation/Math
Array900Sorting + 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
Read: Binary Search
2

Day 3-4: Two Pointers

  • Two pointers on sorted arrays
  • Sliding window
  • Subarray problems
Read: Two Pointers
3

Day 5-7: Prefix Sums

  • 1D prefix sum
  • Difference arrays
  • Range sum queries
Read: Prefix Sum
Weekly Target: 20 problems (1000-1200), 2 virtual contests Key Problems:
ProblemRatingConcept
Worms1200Binary Search
Books1400Two Pointers
Number of Segments with Big Sum1100Two Pointers
Frog Jumps1100Binary Search
Yet Another Counting Problem1300Prefix Sum

Week 6: Graphs Basics

1

Day 1-2: Graph Representation

  • Adjacency list
  • Reading graph input
  • Directed vs undirected
Read: Graph Fundamentals
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
Weekly Target: 15 graph problems (1000-1300), solid DFS/BFS skills Key Problems:
ProblemRatingConcept
Counting Rooms~1200Flood Fill
Labyrinth~1300BFS Path
Building Roads~1200Components
King Escape1000Grid BFS
Lakes in Berland1600Flood 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
Read: DP Fundamentals
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
Weekly Target: 15 DP problems, understand state design Key Problems:
ProblemRatingConcept
Dice Combinations~12001D DP
Minimizing Coins~1300Coin Change
Coin Combinations I~1300Counting
Boredom1500DP
Vacation~13002D DP

Week 8: Contest Strategy & Consolidation

1

Day 1-2: Contest Strategy

  • Time management
  • When to skip problems
  • Reading problems effectively
  • Handling pressure
Read: Contest Strategy
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
Weekly Target: 3 virtual contests, 1 live contest, review all mistakes

Week 9-11: Road to Expert (+3 Weeks)

Week 9: Advanced DP & Trees

DayFocusProblems
1-22D DP, Grid DPDP on Grids
3-4Tree basics, Tree DPTrees
5-7Practice + Contest2 virtual contests

Week 10: Data Structures

DayFocusProblems
1-2DSU (Union-Find)DSU
3-4Segment Tree basicsSegment Trees
5-7Practice + ContestFocus on 1400-1600 problems

Week 11: Advanced Topics & Expert Push

DayFocusProblems
1-2Bit manipulationBit Manipulation
3-4String basicsStrings
5-7Contest marathon3 virtual contests, 1-2 live contests

Daily Schedule Template

┌─────────────────────────────────────────────────────┐
│           IDEAL CP DAY (2-3 hours)                  │
├─────────────────────────────────────────────────────┤
│  0:00 - 0:30   Upsolve yesterday's problems         │
│  0:30 - 1:30   Solve 2-3 new problems               │
│  1:30 - 2:00   Read editorial for any you couldn't  │
│  2:00 - 2:30   Review and add to notes              │
│  (Weekend)     Virtual contest + full upsolve       │
└─────────────────────────────────────────────────────┘

Progress Tracking

Rating Milestones

WeekExpected RatingProblems SolvedKey Skill
1800-90020CF format comfortable
2900-100045Implementation solid
31000-110065Math basics done
41100-120085Greedy intuition
51150-1250105Binary search mastered
61200-1300120Graphs basics
71250-1350135DP started
81300-1400150Specialist!
111500-1600200Expert!

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

Week 1-2 Mistakes:
  • Not reading problems fully (missing constraints)
  • Forgetting long long for large numbers
  • Not handling multiple test cases properly
  • Submitting without testing edge cases
Week 3-4 Mistakes:
  • Overcomplicating greedy problems
  • Not proving greedy approach works
  • Integer overflow in math problems
  • Off-by-one errors in loops
Week 5-8 Mistakes:
  • Using wrong binary search variant
  • Infinite loops in binary search
  • Not initializing graph arrays
  • DP state design too complex

Resources for Each Week

WeekPrimary ResourceBackup Resource
1This course + CF 800USACO Guide
2CF 800-900 problemsAtCoder Beginner
3CF Math problemsCSES Math section
4CF Greedy + SortingCSES Sorting
5CSES SearchingCF Binary Search tag
6CSES GraphCF DFS/BFS tag
7AtCoder DP ContestCSES DP section
8Virtual contestsPast Div 2 rounds

Next Steps