Medals are not decided during the contest — they are decided by how you train and by your execution discipline on the day. This is not a general algorithms textbook: it is a focused 15-session program for students who already know the basics and are training specifically to compete for a national title.

A415 SessionsBI · ENPublic Edition
Profitina Becoming National Champion
Download Full Book (PDF)

This is the Public Edition: every one of the fifteen ACCEPTED solutions is worked through in full — problem breakdown, complexity analysis, and the algorithm explained end to end — with roughly half of the actual code shown and the other half left as your task, guided by targeted hints. You are not handed a solution to copy; you finish it, the way a real judge finishes it.

Overview

Becoming National Champion opens with a full contest-day strategy playbook — problem-mapping in the first ten minutes, and subtask hunting as a deliberate points strategy — before moving into advanced data structures: segment trees as a general range-answering machine, persistent segment trees and order statistics, monotonic stacks, and a first hands-on lab on dynamic updates to “living” data structures. It continues through two graph sessions (state-space BFS and small-weight shortest paths, then DSU, MST, and sweep techniques) with a second lab on Euler-tour BIT and binary lifting, two dynamic-programming sessions (counting distinct objects, then bitmask and profile DP) with a third lab on CDQ divide-and-conquer at scale, meet-in-the-middle search, suffix arrays and LCP for string problems, and competitive mathematics (finite differences, interpolation, modular arithmetic) — closing with a fourth lab that runs a full contest simulation against a max-flow “boss problem.”

What You Will Learn

  • Run a disciplined contest-day process — problem mapping, subtask hunting, and time budgeting — instead of improvising under pressure.
  • Build and use segment trees, persistent segment trees, and order-statistics structures for range queries.
  • Apply monotonic stacks and Euler-tour BIT with binary lifting to problems that look intractable at first glance.
  • Model graph problems with state-space BFS, DSU, MST, and sweep-line techniques.
  • Recognize and solve counting and bitmask/profile dynamic-programming problems, and scale DP with CDQ divide-and-conquer.
  • Apply meet-in-the-middle search, suffix arrays, and competitive mathematics — and prove it all under full contest conditions against a genuine boss-level problem.

Inside the Book

  1. The Champion’s Playbook: Contest-Day Strategy, Tips & Tricks — training discipline and contest-day execution, before any algorithm.
  2. The Segment Tree: A Range-Answering Machine — the single most reusable advanced data structure in competitive programming.
  3. Persistent Segment Trees & Order Statistics — querying every past version of a structure, not just the current one.
  4. Monotonic Stacks & Linear Array Techniques — turning apparently quadratic problems linear.
  5. Lab 1 — Living Data Structures: Dynamic Updates — hands-on practice keeping structures correct under live updates.
  6. Graphs I: State-Space BFS & Small-Weight Shortest Paths — search over states, not just vertices.
  7. Graphs II: DSU, MST & Sweep Techniques — connectivity, spanning trees, and sweeping across sorted events.
  8. Lab 2 — Living Trees: Euler BIT + Binary Lifting — hands-on practice with two of the trickiest tree techniques.
  9. DP I: Counting Distinct Objects — dynamic programming for counting problems.
  10. DP II: Bitmask & Profile DP — dynamic programming over subsets and evolving profiles.
  11. Lab 3 — DP at Scale: CDQ Divide & Conquer — hands-on practice scaling DP beyond the naive bound.
  12. Meet in the Middle: Halving the Exponential — splitting an exponential search space in two.
  13. Strings: Suffix Arrays & LCP — advanced string matching and comparison at contest speed.
  14. Competitive Mathematics: Finite Differences, Interpolation & Modular Arithmetic — the math toolkit behind many hard problems.
  15. Lab 4 — Full Contest Simulation + the Max-Flow Boss Problem — everything trained so far, tested under real contest conditions.
Who this book is for: students who already have a solid algorithms and data-structures foundation (from Conquering SPOJ or equivalent) and are training specifically for national- and international-level competitive-programming selection.

💬 Community Discussion