← All Posts

Introduction to Competitive Programming

Codeforces Rating Journey 2100 1900 1600 1400 1200

Major CP Platforms

Competitive programming is practiced on several online judges, each with distinct problem styles, contest formats, and communities. Understanding each platform's strengths helps you structure your practice.

Codeforces

The most active CP platform worldwide. Hosts 2–3 rated contests per week in divisions: Div 1 (1900+), Div 2 (0–2099), Div 3 (<1600), and Div 4 (<1400). Problems range from implementation to deep math and advanced data structures. The editorial culture and comment discussions are unmatched.

Best for: Regular practice, rating tracking, editorial learning.

AtCoder

Japanese platform known for mathematically elegant problems. Contests: ABC (beginner), ARC (regular), AGC (grand). Problems often require clean mathematical observations rather than heavy implementation. The AtCoder Library (ACL) is a gold-standard reference for competitive programming data structures.

Best for: Mathematical thinking, clean problem design, library reference.

ICPC

The International Collegiate Programming Contest is team-based (3 people, 1 computer). Regional → national → world finals pipeline. Problems span all areas: geometry, strings, flows, DP, number theory. The team dynamic adds strategy: who solves what, when to print, balloon tracking. Training typically involves weekly 5-hour practice contests with your team.

Best for: Team collaboration, contest strategy, breadth of topics.

IOI / National Olympiads

The International Olympiad in Informatics targets pre-university students. Problems are fewer (3 per day) but deeper—often requiring subtask-based partial scoring. Common topics: interactive problems, output-only tasks, and problems with heavy optimization requirements. National olympiads (USACO, JOI, COCI) serve as qualifiers.

Best for: Deep problem-solving, partial scoring strategies, optimization.

Platform tip: Don't spread yourself too thin. Pick Codeforces as your primary rating tracker and supplement with AtCoder for math-heavy practice. Use Gym on Codeforces to practice ICPC regionals.

Rating Systems Explained

Understanding how ratings work helps you set realistic goals and avoid tilting after bad performances.

Codeforces Elo-like System

Codeforces uses a modified Elo system. Your rating changes based on your rank relative to your expected rank (computed from the ratings of all participants). Key properties:

// Simplified rating change intuition expected_rank = f(your_rating, all_participants) actual_rank = your_position_in_standings delta = K * (expected_rank - actual_rank) // If you beat expectations → positive delta // If you underperform → negative delta // K ≈ 400-800 for new accounts, ~200 for established

AtCoder Rating

AtCoder uses a similar system but with a performance rating concept. After each contest, you receive a "performance" value. Your rating converges toward your average performance over time. The key difference: AtCoder explicitly shows your performance per contest, making it easy to track progress.

Rating Tiers Comparison

Codeforces Tiers

  • Newbie: 0–1199
  • Pupil: 1200–1399
  • Specialist: 1400–1599
  • Expert: 1600–1899
  • Candidate Master: 1900–2099
  • Master: 2100–2299
  • Grandmaster: 2400+

AtCoder Tiers

  • Gray: 0–399
  • Brown: 400–799
  • Green: 800–1199
  • Cyan: 1200–1599
  • Blue: 1600–1999
  • Yellow: 2000–2399
  • Orange: 2400–2799
  • Red: 2800+

Effective Practice Strategy

Grinding problems randomly is the #1 mistake. Here's a structured approach that actually works, based on the experience of many competitive programmers who've gone from gray to purple.

The +200 Rule

Practice problems rated 200 points above your current rating. If you're 1400, solve 1600-rated problems. This ensures you're being challenged without being completely lost. Use Codeforces Problemset filters: set the rating range and sort by number of solvers (descending) to find accessible problems at that difficulty.

Upsolving Protocol

After every contest, upsolve at least one problem you couldn't solve during the contest:

  1. Spend 30–60 minutes attempting it with fresh eyes (no editorial yet)
  2. If still stuck, read the editorial but don't look at code
  3. Implement the solution yourself from the editorial idea
  4. If your implementation fails, then compare with editorial code
  5. Tag the problem with the technique used for future review
Anti-pattern: Reading the editorial immediately after the contest and copy-pasting the solution. You learn nothing this way. The struggle of implementation is where real learning happens.

Topic-Focused Blocks

Dedicate 1–2 week blocks to specific topics. For example:

Within each block, solve 15–25 problems of increasing difficulty. Track your solve rate and time.

Contest Workflow

How you approach a contest matters as much as what you know. Here's a typical workflow for a Codeforces Div 2 contest (6 problems, 2 hours):

Pre-contest (5 minutes before)

During Contest

// Typical time allocation for Div 2 (2h = 120 min) Problem A: 0–5 min (read, code, submit — must be instant) Problem B: 5–20 min (read carefully, handle edge cases) Problem C: 20–60 min (the make-or-break problem for rating) Problem D: 60–100 min (attempt if C is done, often harder) Problem E: 100–120 min (only if D went fast, usually post-contest) // Key: Don't get stuck on C for 90 minutes. If stuck after 40 min, // read D — sometimes D is easier than C for your skillset.

Post-contest (same day)

ICPC team strategy: In team contests, one person reads all problems and assigns them. The fastest coder takes A/B, the strongest takes the hardest, and the middle person handles implementation-heavy problems. Rotate printer access.

Rating Progression Roadmap

Here's a realistic roadmap for going from beginner to expert on Codeforces. Times assume consistent practice (1–2 hours daily, 2+ contests per week).

Gray → Green (0–1399): 1–3 months

Green → Cyan (1400–1599): 2–4 months

Cyan → Blue (1600–1899): 4–8 months

Blue → Purple (1900–2099): 6–12 months

Reality check: These timelines are optimistic. Most competitive programmers plateau at cyan/blue and stay there for 6–12 months. This is normal. The key is to not stop competing during plateaus—keep entering contests even when rating isn't moving.

Common Beginner Mistakes

Avoid these pitfalls that slow down thousands of competitive programmers:

1. Only Solving Easy Problems

Solving 500 problems rated 800 won't make you better. You must consistently work at the edge of your ability. If you're solving >80% of problems you attempt, you need to increase difficulty.

2. Not Reading Editorials

Some people refuse to read editorials out of pride. After a genuine effort (30-60 min), reading the editorial is the most efficient way to learn new techniques. The editorial teaches you the thought process, not just the solution.

3. Ignoring Implementation Speed

In contests, speed matters. Practice typing your template from memory. Use macros for common patterns. Time yourself on problems you know how to solve—your implementation should be near-instant.

4. Language Wars

Use C++ for competitive programming. Period. Python is too slow for most problems (100× slower). Java works but has verbose I/O and higher constant factors. C++ gives you STL, fast I/O, and the best constant factors. Every serious competitive programmer uses C++.

// The minimal C++ competitive programming skeleton #include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while (t--) { // solve } return 0; }

5. Not Using Version Control

Keep a Git repository of all your contest solutions organized by platform and contest. This lets you search past solutions when you encounter similar problems. Many top competitors maintain public GitHub repos of their solutions.

Next up: In the next post, we'll dive into I/O optimization—one of the most common sources of TLE (Time Limit Exceeded) for beginners, and an easy fix that every competitive programmer must know.