Skip to main content

Upsolving & Reading Editorials

What is Upsolving?

Upsolving = Solving problems you couldn’t solve during a contest, after the contest ends. This is where 80% of your learning happens.
The contest shows you what you don’t know. Upsolving teaches you what you need to know.

The Upsolving Process

Step 1: Wait & Reset (5-10 minutes)

After a contest:
  1. Take a break—clear your head
  2. Don’t read editorials immediately
  3. Note which problems you attempted but failed

Step 2: Second Attempt (20-30 minutes per problem)

Before reading the editorial:
  1. Re-read the problem statement carefully
  2. Check if you missed any constraint or condition
  3. Think about the problem type (greedy? DP? graph?)
  4. Try a different approach than during contest
┌─────────────────────────────────────────────────────┐
│                  SECOND ATTEMPT                      │
├─────────────────────────────────────────────────────┤
│  1. Did I read the problem correctly?               │
│  2. What constraints did I miss?                    │
│  3. What approach makes sense for these bounds?     │
│  4. Can I simplify the problem?                     │
│  5. Are there any patterns I recognize?             │
└─────────────────────────────────────────────────────┘

Step 3: Read the Editorial

If you’re still stuck after 20-30 minutes, read the editorial. How to read an editorial effectively:
1

Read Only the First Hint

Most editorials have multiple levels. Read just the first observation or hint.
2

Close and Try Again

With that hint, attempt the problem again for 10-15 minutes.
3

Continue Reading If Stuck

Still stuck? Read the next part of the editorial.
4

Understand, Don't Memorize

Ask yourself: “Why does this work?” not “What’s the code?”

Step 4: Implement the Solution

Even if you understand the editorial, code it yourself.
// Don't copy-paste from editorial
// Type it out, understand each line
// Add your own comments explaining the logic

Step 5: Analyze the Key Insight

Write down the key insight in your own words:
Problem: [Problem Name]
Key Insight: [One sentence explaining the core trick]
Pattern: [What type of problem was this?]
Mistake: [What did I miss during contest?]

Understanding CF Editorials

Structure of a CF Editorial

┌─────────────────────────────────────────────────────┐
│  Problem A - [Title]                                │
│                                                     │
│  Time Complexity: O(n)                              │
│  Author: [Name]                                     │
│                                                     │
│  [Observations/Hints]                               │
│    Observation 1: ...                               │
│    Observation 2: ...                               │
│                                                     │
│  [Solution Approach]                                │
│    Step-by-step explanation                         │
│                                                     │
│  [Code]                                             │
│    Reference implementation                          │
│                                                     │
│  [Proof/Why It Works] (sometimes)                   │
└─────────────────────────────────────────────────────┘

Reading Between the Lines

Common Editorial Phrases & Their Meanings:
Editorial SaysWhat It Really Means
”Observe that…”This is the key insight you probably missed
”It’s easy to see…”It’s not easy, but this is a standard technique
”Without loss of generality…”You can simplify by assuming something
”Clearly…”The author thinks it’s obvious (it’s not)
“Consider the optimal solution”Think about what any correct answer must look like
”Greedy works because…”There’s a proof, but trust it for now

Upsolving Workflow

Immediate Upsolve (Same Day)

┌─────────────────────────────────────────────────────┐
│              CONTEST DAY SCHEDULE                   │
├─────────────────────────────────────────────────────┤
│  Contest                     2 hours                │
│  Break                       30 min                 │
│  Second attempt (no editorial)  30-60 min          │
│  Read editorials + understand   30 min             │
│  Implement solutions            30-60 min          │
└─────────────────────────────────────────────────────┘

Spaced Upsolving (1-7 Days Later)

Problems you’ve read editorials for:
  1. Solve again from scratch (no looking)
  2. If you can’t, you didn’t truly understand
  3. Read editorial again if needed
  4. Repeat until you can solve independently

Building Your Problem Log

Create a structured log of every problem you upsolve:

Template

## Problem: [Link]
**Rating**: [800-3500]
**Tags**: [DP, Greedy, Graph, etc.]
**Date**: [When solved]
**Source**: [Div 2 C, Educational, etc.]

### Key Insight
[One sentence: the core trick or observation]

### Approach
1. [Step 1]
2. [Step 2]
3. [Step 3]

### My Mistake During Contest
[What went wrong / what I missed]

### Pattern Recognition
[What type of problem is this? What similar problems exist?]

### Code Snippet (if unique technique)
```cpp
// Key part of the solution

### Example Log Entry

```markdown
## Problem: CF 1873D - 1D Eraser
**Rating**: 1100
**Tags**: Greedy, Two Pointers
**Date**: 2024-01-15
**Source**: Div 4 D

### Key Insight
Greedily erase from left to right. When you hit a 'B', 
erase the next k characters and jump ahead.

### Approach
1. Scan left to right
2. When we see 'B', increment count, skip k characters
3. When we see 'W', just move to next character

### My Mistake During Contest
Overthought it. Tried to find "optimal" erasing positions.
Should have realized greedy from left works.

### Pattern Recognition
This is a "greedy scheduling" problem in disguise.
Similar to: interval covering, activity selection.

Finding Editorials

Where to Look

Pro Tip: Official CF editorials are the gold standard. They include mathematical proofs and formal explanations that make the ideas much more intuitive than just looking at code. Understanding the “why” through proofs builds stronger pattern recognition.
SourceQualityWhy Use It
Official CF Editorial⭐⭐⭐⭐⭐Mathematical proofs, formal explanations, builds intuition
CF Comment SectionVariableCommunity insights, alternative approaches
CP-AlgorithmsExcellentDeep theory and implementation details
USACO GuideGreatWell-structured for common problems

Reading CF Editorials Effectively

  1. Focus on the proof - Understanding why something works is more valuable than the code
  2. Trace through the logic - Follow each observation step by step
  3. Identify the key invariant - What property makes the solution correct?
  4. Connect to similar problems - How does this proof pattern apply elsewhere?

Common Upsolving Mistakes

Mistake 1: Reading Editorial Too SoonGive yourself at least 20-30 minutes of genuine effort before reading.
Mistake 2: Copy-Pasting CodeAlways type the solution yourself. Muscle memory matters.
Mistake 3: Not Implementing After ReadingUnderstanding ≠ Being able to code it. Always implement.
Mistake 4: Moving On Too QuicklyIf you can’t explain the solution to a friend, you don’t understand it.
Mistake 5: Never RevisitingProblems you upsolve should be solved again 3-7 days later.

The Spaced Repetition System

Rating-Based Intervals

Problem RatingFirst RevisitSecond RevisitThird Revisit
At your level3 days7 days30 days
+100 above2 days5 days14 days
+200 above1 day3 days7 days

Tracking System

Create three lists:
  1. New: Problems to upsolve
  2. Review: Problems to revisit
  3. Mastered: Problems you can solve reliably
Move problems through the pipeline as you master them.

Virtual Contest + Upsolve Combo

The most effective practice routine:
┌─────────────────────────────────────────────────────┐
│           WEEKLY SCHEDULE                           │
├─────────────────────────────────────────────────────┤
│  Saturday:                                          │
│    - Virtual Contest (2 hours)                      │
│    - Break (30 min)                                 │
│    - Upsolve unsolved (1-2 hours)                   │
│                                                     │
│  Sunday:                                            │
│    - Review Saturday's upsolves                     │
│    - Solve 3-5 new problems                         │
│                                                     │
│  Monday-Friday:                                     │
│    - Solve 2-3 problems daily                       │
│    - Review old upsolves (spaced repetition)        │
└─────────────────────────────────────────────────────┘

Upsolving by Problem Type

Greedy Problems

  1. Identify the greedy choice
  2. Understand why greedy works (exchange argument)
  3. Practice recognizing the pattern

DP Problems

  1. Identify the state
  2. Write the recurrence relation
  3. Understand transition logic
  4. Practice state design on similar problems

Graph Problems

  1. Identify the graph structure
  2. Know which algorithm applies
  3. Practice graph construction from problem statements

Math Problems

  1. Identify the mathematical property
  2. Prove or understand the key formula
  3. Remember the technique for future problems

Key Metrics to Track

Weekly Goals

MetricTargetPurpose
Problems Upsolve10-15Learning new techniques
Problems Revisited5-10Solidifying knowledge
Virtual Contests1-2Simulating real conditions
New Patterns Learned2-3Expanding toolkit

Monthly Review

At the end of each month:
  1. Review your problem log
  2. Identify common weak areas
  3. Specifically practice those areas
  4. Celebrate progress!

Next Steps