Skip to content

Foundations -> C++ Language

Core C++ contest toolkit: fast I/O, references and value semantics, STL primitives, and the subset of the language that matters most under time pressure.

  • Topic slug: foundations/cpp-language
  • Tutorial page: Open tutorial
  • Ladder page: Open ladder
  • Repo problems currently tagged here: 3
  • Repo companion pages: 3
  • Curated external problems: 6

Microtopics

  • fast-io
  • value-vs-reference
  • const-correctness
  • vector-and-pair
  • sort-and-lower_bound
  • maps-and-sets
  • priority_queue
  • overflow-discipline

Learning Sources

Source Type
cppreference language Primary
cppreference containers Primary
cppreference algorithms Primary

Practice Sources

Source Type
CSES Problem Set Practice
Codeforces sortings tag Practice

Repo Companion Material

Material Type
Foundations cheatsheet quick reference
Templates overview template guide
STL basics ladder adjacent ladder

Curated External Problems

Warm-Up

Problem Source Difficulty Context Style Prerequisites Tags Why it fits
Missing Number CSES Easy - Implementation-Heavy Basic Arithmetic; Arrays; Input/Output Arrays; Math; Accumulation; Scan Good practice for reading values, tracking a simple invariant, and avoiding off-by-one mistakes.
Repetitions CSES Easy - Implementation-Heavy Strings; Loops; Basic Comparisons Scanning; Runs; Run-Length; Scan Reinforces careful string scanning and run-length style logic without extra data structures.
Weird Algorithm CSES Easy - Implementation-Heavy Basic Loops; Branching; Input/Output Simulation; Loops; I/O; Branching A clean first task for writing a loop, handling parity, and printing a sequence correctly.

Core

Problem Source Difficulty Context Style Prerequisites Tags Why it fits
Coin Piles CSES Easy - - - Parity; Cases; Math Great first problem for branch logic and case analysis.
Permutations CSES Easy - Implementation-Heavy Loops; Arrays; Simple Constructive Ideas Construction; Parity; Output-Formatting A nice starter for constructing outputs with a simple parity-based pattern.

Theory / Course

Problem Source Difficulty Context Style Prerequisites Tags Why it fits
Increasing Array CSES Easy - Proof-Heavy; Implementation-Heavy Arrays; Greedy Reasoning; Prefix Invariants Arrays; Invariants A compact proof-by-invariant problem where the implementation is simple but the invariant matters.

Repo Problems

Code Title Fit Difficulty Pattern Note Solution
DISTINCTNUMBERS Distinct Numbers secondary easy sort unique; container deduplication; stl algorithms Note Code
MISSINGNUMBER Missing Number primary easy running total subtraction; arithmetic series sum; type safe warm-up Note Code
WEIRDALGORITHM Weird Algorithm primary easy simulation loop; parity branching; first local workflow Note Code

Regeneration

python3 scripts/generate_problem_catalog.py