Tap here to switch tabs
Problem
Submissions

Problem: Divide an Array Into Subarrays With Minimum Cost I

Try to solve the Divide an Array Into Subarrays With Minimum Cost I problem.

Statement

You are given an array of integers nums of length nn.

You need to partition nums into 33 contiguous, non empty, and disjoint subarrays. The cost of a partition is defined as the sum of the first element of each of the 33 subarrays.

Return the minimum possible total cost of partitioning the array.

Constraints:

  • 3≤n≤503 \leq n \leq 50

  • 1≤1 \leq nums[i] ≤50\leq 50

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Divide an Array Into Subarrays With Minimum Cost I

Try to solve the Divide an Array Into Subarrays With Minimum Cost I problem.

Statement

You are given an array of integers nums of length nn.

You need to partition nums into 33 contiguous, non empty, and disjoint subarrays. The cost of a partition is defined as the sum of the first element of each of the 33 subarrays.

Return the minimum possible total cost of partitioning the array.

Constraints:

  • 3≤n≤503 \leq n \leq 50

  • 1≤1 \leq nums[i] ≤50\leq 50