Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
After the first operation, the score of other operations is fixed.
For the fixed score use dynamic programming <code>dp[l][r]</code> to find a maximum number of operations on the subarray <code>nums[l..r]</code>.