294
传统题
[CF713C] 严格递增最小修改代价 (Sonya and Problem Without a Legend)
[CF713C] 严格递增最小修改代价 (Sonya and Problem Without a Legend)
Problem Statement
You are given an array of positive integers. In one move, you can increase or decrease any element by (elements may become or negative).
Find the minimum number of moves required to make the array strictly increasing.
Input
The first line contains (). The second line contains integers ().
Output
Print the minimum number of moves.
Example
7
2 1 5 11 5 9 11
9
Note
- Constraints:,。
- Source:Codeforces 713C · Sonya and Problem Without a Legend