AtCoder Educational DP Contest

Welcome to the AtCoder Educational DP Contest section! This comprehensive collection covers 26 dynamic programming problems designed to teach and reinforce various DP techniques from basic to advanced.

Overview

The AtCoder Educational DP Contest is a curated set of problems that progressively build your understanding of dynamic programming. Each problem is labeled from A to Z and covers different DP patterns and techniques.

Problem Categories

Basic DP (Problems A-E)

1D Linear DP

State Machine DP

Knapsack Problems

Graph & Grid DP (Problems G-H)

Probability & Game Theory (Problems I-K)

Advanced DP Patterns (Problems L-M)

Interval & Bitmask DP (Problems N-O)

Tree DP (Problems P-V)

Advanced Techniques (Problems R-Z)

Learning Path

Beginner Level (A-C)

Start with these fundamental problems:

  1. Frog 1 - Learn basic 1D DP
  2. Frog 2 - Extend to multiple transitions
  3. Vacation - Understand state machine DP

Intermediate Level (D-M)

Build on fundamentals:

  1. Knapsack 1 & 2 - Master knapsack variants
  2. Grid 1 - Learn 2D DP
  3. Longest Path - DP on graphs
  4. Coins, Sushi - Probability and expectation DP
  5. Deque, Slimes - Interval DP

Advanced Level (N-Z)

Challenge yourself with advanced techniques:

  1. Matching - Bitmask DP
  2. Tree DP problems - Independent Set, Subtree
  3. Matrix Exponentiation - Walk
  4. Digit DP - Digit Sum
  5. Convex Hull Trick - Frog 3

Key DP Techniques Covered

1. Basic DP Patterns

  • 1D Linear DP: Frog 1, Frog 2
  • 2D Grid DP: Grid 1, Grid 2
  • State Machine DP: Vacation

2. Optimization Techniques

  • Space Optimization: Rolling arrays, state compression
  • Time Optimization: Prefix sums, segment trees
  • State Inversion: Knapsack 2

3. Advanced DP Types

  • Interval DP: Deque, Slimes, Intervals
  • Bitmask DP: Matching, Grouping
  • Tree DP: Independent Set, Subtree
  • Digit DP: Digit Sum
  • Probability DP: Coins, Sushi

4. Optimization Algorithms

  • Matrix Exponentiation: Walk
  • Convex Hull Trick: Frog 3
  • Inclusion-Exclusion: Grid 2

Problem Difficulty Guide

Difficulty Problems Key Concepts
⭐ Beginner A, B, C, D, H Basic DP, 1D/2D DP
⭐⭐ Intermediate E, G, I, J, K, L, M, N Advanced patterns, optimization
⭐⭐⭐ Advanced O, P, Q, R, S, T, U, V, W, X, Y, Z Complex techniques, specialized algorithms

Practice Recommendations

Week 1: Foundation

  • Complete problems A, B, C, D, H
  • Focus on understanding DP state definitions
  • Practice writing recurrence relations

Week 2: Patterns

  • Complete problems E, G, I, J, K, L, M
  • Learn different DP patterns
  • Practice optimization techniques

Week 3: Advanced

  • Complete problems N, O, P, Q, R, S, T, U, V, W, X, Y, Z
  • Master advanced techniques
  • Challenge yourself with complex problems

Resources

Official Contest

  • Check each problem’s analysis page for related CSES and LeetCode problems

Tips for Success

  1. Start with Basics: Don’t skip the easy problems - they build essential foundations
  2. Understand State: Clearly define what your DP state represents
  3. Practice Transitions: Master writing recurrence relations
  4. Optimize Gradually: First make it work, then optimize
  5. Study Patterns: Recognize common DP patterns across problems

Ready to start? Begin with Frog 1 and work your way through the problems systematically!