← 返回 amazon 的题目列表Minimum Operations to Make Array Non-decreasing
类型:online_judge
Given an integer array power, you can repeatedly choose a contiguous subarray and increment each element in that subarray by 1. Your goal is to make the whole array non-decreasing with the minimum number of operations. Please determine the minimum total number of operations required.
Example
Input
1 5 2 6