📜 WAYPOINT LESSON
Contest 2-A: Cầu thang phí
⭐ beginner⏳ 25 min read📍 Lesson 120 of 281
Mock contest 2, problem A: min-cost climbing DP. Target: solved within 25 minutes.
Contest 2-A — Cầu thang phí. DP một chiều. Near-miss bị chấm: tham lam theo bước rẻ nhất cục bộ.
Contest 2-A. Min-cost climbing stairs: dp[i] = c[i] + min of the two previous; answer is min of the last two states. Graded near-miss: per-step greedy.
Contest 2-A — Cầu thang phí. DP một chiều: dp[i] = c[i] + min(dp[i−1], dp[i−2]); đáp án min hai trạng thái cuối. Near-miss bị chấm: tham lam theo bước rẻ nhất cục bộ.