Skip to content

Chapter 11: Contest Craft

Overview

Knowing algorithms is necessary but not sufficient — you also need the practical meta-skills to deploy them under time pressure. This chapter covers everything around the algorithms: choosing the right data structure, deciding between DP and greedy, debugging when you're panicking, and planning your study progression. It also includes copy-paste-ready templates and cheatsheets. Come here when you want to level up your contest performance, not just your algorithmic knowledge.

Coming from: Chapter 10 — Patterns and Recipes — meta-patterns for recognizing which technique to apply
Going to: Chapter 12 — Practice Ladders — structured practice from CF 1100 to 2100

Topics at a Glance

#TopicDifficultyKey Trigger Phrase
01Codeforces Tips and WorkflowIntermediate"How do I structure my contest strategy?"
02Study Plan — CF 1100 → 2100Intermediate"What should I study this week?"
03Common C++ TemplatesIntermediate"Give me copy-paste-ready contest code"
04STL Quick ReferenceBeginner"What's the syntax for lower_bound again?"
05Complexity CheatsheetBeginner"What's the complexity of this operation?"
06Data Structure Selection GuideIntermediate"Which data structure handles range queries + point updates?"
07DP vs Greedy GuideBeginner"Should I use DP or greedy here?"
08BFS vs DFS GuideBeginner"Should I use BFS or DFS?"
09Debugging Under PressureIntermediate"Got WA and I'm panicking"
10ReflectionsBeginner"I feel stuck and not improving"

Appendices — drills, mock contests, and posters

#TopicUse it for
11Speed DrillsTimed implementation practice for common templates
13Mistake JournalCapture wrong submissions as data, not noise
14Mock Contest 1Div 2 warm-up simulation
15Mock Contest 2Technique diagnostic
16Mock Contest 3Speed round
17DS Selection PosterOne-page decision tree for data structures
18DP Pattern PosterOne-page taxonomy of DP shapes
19Graph Algorithm PosterOne-page graph algorithm map

If You Only Read 3 Files

  1. Data Structure Selection Guide — because choosing the right data structure is half the battle. This decision matrix saves you from that agonizing "should I use a segment tree or a Fenwick tree?" moment during a contest.
  2. Debugging Under Pressure — because WA on test 5 with 30 minutes left is the most stressful moment in CP, and having a systematic debugging protocol (instead of randomly changing things) can save your rating.
  3. Study Plan — because undirected practice is the #1 reason people plateau. This 32-week roadmap gives you a concrete week-by-week plan from CF 1100 to 2100.

Cross-Chapter Connections


File Listing

FileTopicLevel
bfs-vs-dfs-guideBFS vs DFS Decision Guide
dp-vs-greedy-guideDP vs Greedy Decision Guide
stl-quick-referenceSTL Quick Reference
common-templatesCommon C++ Templates⭐⭐
complexity-cheatsheetComplexity Cheatsheet
data-structure-selection-guideData Structure Selection Guide⭐⭐
debugging-under-pressureDebugging Under Pressure⭐⭐
cf-tips-and-workflowCodeforces Tips and Workflow⭐⭐
study-planStudy Plan — CF 1100 → 2100⭐⭐
reflectionsReflections

Suggested Reading Order

Two paths through this chapter — they are not used in the same moment.

Before contests (study and preparation):

  1. complexity-cheatsheet — quick reference for all complexities
  2. stl-quick-reference — STL containers and algorithms at a glance
  3. bfs-vs-dfs-guide — when to use which traversal
  4. dp-vs-greedy-guide — when to use DP vs greedy
  5. data-structure-selection-guide — pick the right structure for the job
  6. common-templates — copy-paste-ready C++ contest templates
  7. cf-tips-and-workflow — contest strategy and testing workflow
  8. study-plan — personalized progression plan from 1100 to 2100
  9. reflections — honest observations on getting stuck and getting better

During contests (quick-reference path):

  1. complexity-cheatsheet — sanity-check your candidate approach
  2. stl-quick-reference — syntax recall under pressure
  3. ds-selection-poster, dp-pattern-poster, graph-algorithm-poster — one-page decision aids
  4. debugging-under-pressure — protocol when WA strikes

Built for the climb from Codeforces 1100 to 2100.