Skip to content

competitive-programming-cpp

A C++ algorithms and competitive programming curriculum that ties together theory, clean implementation, and deliberate practice.

This repo is meant to be more than a template dump and more than a solutions archive. The goal is a source-backed learning path shaped by strong university algorithms courses, major contest systems, and practical community references.

Project site: mtuann.github.io/competitive-programming-cpp

If you want one guided first door instead of browsing sections, start with Start Here. If you want the repo organized by routes instead of folders, open the Route Map.

Repo Taxonomy At A Glance

This figure shows the repo's deep algorithm surface in one view, grouped by family instead of by folder listing.

Deep Topic Taxonomy

If you want the full page version with scope notes, open Deep Topic Taxonomy.

Support

If this repo helps your training or saves you time, you can support the project here:

Support competitive-programming-cpp

Start Here

If you are... Start with Goal
New to competitive programming Start Here Build C++ fluency, asymptotics, and the core toolkit without self-routing too early
Comfortable with basics but inconsistent in contests Route Map + Practice Turn weak topics into focused ladder/note loops and start retrieval work
Preparing for USACO / olympiad-style contests Contest Playbooks + Practice Train topic by topic, then move into solo-track drills and archive follow-up
Preparing for ICPC / team contests Contest Playbooks + Practice Build breadth, switching, and one-machine/team workflows
Contributing content later Topic Template + Content Blueprint Follow one stable teaching format instead of adding ad hoc notes

Curriculum Map By Level

The repo uses curriculum levels as the content-progression language.

This is separate from the learner Stage 1-4 route model used in Start Here and the Route Map.

Curriculum level Main focus Typical folders
Level 0 Foundations: C++ workflow, STL, asymptotics, proof habits, sorting, binary search, prefix ideas topics/foundations/
Level 1 Core data structures and query/update tools topics/data-structures/
Level 2 Graphs and dynamic programming as contest core topics/graphs/, topics/dp/
Level 3 Math, combinatorics, strings, and geometry for broader coverage topics/math/, topics/combinatorics/, topics/strings/, topics/geometry/
Level 4 Advanced algorithms and theory topics/advanced/
Level 5 Contest engineering: notebooks, drills, workflows, and upsolving discipline notebook/, practice/contest-playbooks/

Contest tracks such as USACO, IOI/OI, and ICPC sit on top of these levels. They change emphasis, not the core learning path.

How This Repo Works

  • Learning Areas: layered topic tutorials and area hubs
  • Practice: topic-first ladders, mixed rounds, and contest playbooks
  • Route Map: pick the next door by level, bottleneck, or contest goal
  • Explore: topic maps, indexes, and research-backed coverage lookup
  • Problem Index: current solved problem notes mapped back to their learning hubs
  • External Problem Index: curated official and trusted problems grouped by topic, microtopic, and contest track
  • Topic Maps: trusted learning sources, practice and follow-up sources, and repo coverage for each subtopic
  • Build Kit: templates, notebook pages, and debugging workflows
  • Templates: reusable contest-ready code
  • Notebook: dense reference material for contest use
  • Source Map: the research appendix behind the curriculum choices

Each mature topic page should help a reader answer the whole learning loop, not just the definition:

  1. When should I think of this idea?
  2. What is the naive baseline, and why is it too slow or too weak?
  3. Why is the optimized algorithm correct?
  4. Which variant should I choose?
  5. What is the clean C++ pattern?
  6. What should I solve next?

The source of truth for finished topic pages is docs/topic-template.md.

Catalog Maintenance

When you change topic metadata, problem overrides, ladder notes, or external pools, run the catalog checks before pushing:

python3 scripts/generate_problem_catalog.py --validate-only
python3 scripts/generate_problem_catalog.py --check
python3 scripts/build_site_docs.py
mkdocs build --strict

--validate-only checks the raw data schema and note metadata. --check regenerates the tracked catalog outputs and fails if anything needs to be committed.

References And Standards

The curriculum is grounded in public official sources current through April 22, 2026, including university algorithms syllabi, official contest documents, and major CP references.

Freshness-sensitive external links and workflow recommendations in learner-facing docs were last reviewed on April 24, 2026.

This repo is still growing from scaffold to full curriculum, so the highest-value work is not adding more philosophy pages. It is writing stronger topic pages, cleaner templates, and better practice ladders.