NeetCode #700LC-1799Hard1-D Dynamic Programming
← Back to All Problems#700 · #1799 · Maximize Score After N Operations(N 次操作后的最大分数和)
📌 Problem Statement & Constraints
Given
nums of length 2 * n, perform n operations. In operation i (1-indexed) you pick two unused numbers a and b and gain i * gcd(a, b). Return the maximum total score. Constraints: 1 <= n <= 7, 2 <= 2 * n <= 14, 1 <= nums[i] <= 10^6.🔒
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!