# Competitive Programming (CP) Roadmap

### Pick a Programming Language

- Choose a programming language, preferably
**C++**. - Recommended resource: learncpp.com

### Learn Basic Syntax

- For C++, basic syntax can be learned in the initial chapters of
**CP Handbook**. - Read the
**first 4 chapters**of the CP Handbook.

### Start Participating in Contests

- Begin solving contests on
**CodeForces**,**CodeChef**, and**Atcoder**. - After each contest, attempt to solve
**1-2 additional problems**beyond what you solved during the contest.

### Continue Learning

- Read the
**next 4 chapters**of the CP Handbook. - Alternatively, you can learn from YouTube channels:

### Practice Problem Solving

- Start solving problems on CSES, which contains classical problems essential for CP.
- Use cp-algorithms.com for specific algorithm explanations.
- Refer to USACO Guide for topic-wise problem selections across various difficulty levels.

## CodeForces Rating vs Topic List

### 0-999 Rating

#### Vital Topics

**Brute force**(trying every possibility)**Sorting**(using your language's library function)**Strings**(familiarity with handling them)**Number theory**: floor, ceil, modulo – Number Theory for CP**Basic time complexity**(Big-O notation)

#### Helpful Topics

**Number theory**: divisors, factorization – Number Theory for CP**STL/your language’s library**(e.g., cppreference.com)**Binary search**– Binary Search tutorial**Two pointers****Binary + bitwise operations**– Bitwise Operations for CP

### 1000-1199 Rating

#### Vital Topics

**Brute force**(trying every possibility)**Sorting**(using your language's library function)**Strings**(familiarity with handling them)**Number theory**: divisors, factorization, floor, ceil, modulo**STL/your language’s library**(e.g., cppreference.com)**Time complexity**(Big-O notation)

#### Helpful Topics

**Binary search****Two pointers****Binary + bitwise operations****Dynamic programming**– Dynamic Programming Introduction**Basic combinatorics**– Combinatorics for CP**Basic range queries**(e.g., prefix sums)

### 1200-1399 Rating

#### Vital Topics

**Number theory**: factorization, modular arithmetic, gcd/lcm, prime factor representation**STL/your language’s library**(e.g., cppreference.com)**Binary search****Two pointers**(rarely)**Basic combinatorics****Basic range queries****Recursion**– Recursion for CP**Dynamic programming**

#### Helpful Topics

**Binary + bitwise operations****Graphs/trees****Disjoint Set Union (DSU)****Segment trees**(as overkill) – Segment Tree Tutorial**String algorithms**(e.g., hashing)

### 1400-1599 Rating

#### Vital Topics

**Number theory**: factorization, modular arithmetic, gcd/lcm, prime factor representation**STL/your language’s library**(e.g., cppreference.com)**Binary search**(two pointers, rarely)**Basic combinatorics****Basic range queries****Recursion + Dynamic programming****Basic graphs/trees****Proofs****Constructive problems**(requires practice)

#### Helpful Topics

**Combinatorial techniques****Probability/expected value**(rarely)**DSU****Advanced graph techniques**(e.g., shortest paths, MST)**Segment trees****String algorithms**(e.g., hashing)**Basic game theory**

### 1600-1899 Rating

#### Vital Topics

**Dynamic programming****Basic graphs/trees****Number theory**: factorization, modular arithmetic, prime factor representation**Basic combinatorics**,**probability**, and**expected value****Bitwise operations****Data structures**: segment tree, STL (library)**Game theory**(relatively rare)**Proofs****Constructive problems**(practice required)

Best of luck on your **Competitive Programming** journey!