Sponsored
Use these hints if you're stuck. Try solving on your own first.
It is optimal to never make an operation to the last element of the array.
You can iterate from the second last element to the first. If the current value is greater than the previous bound, we want to break it into pieces so that the smaller one is as large as possible but not larger than the previous one.