NeetCode #715LC-1937Medium2-D Dynamic Programming
← Back to All Problems

#715 · #1937 · Maximum Number of Points with Cost(扣分后的最大得分)

📌 Problem Statement & Constraints

Given an m x n matrix points, choose exactly one cell in each row. The score is the sum of the chosen values minus the total penalty |c1 - c2| over consecutive rows. Return the maximum score. Constraints: 1 <= m, n <= 10^5, 1 <= points[i][j] <= 10^5, and m * n <= 10^5.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!