#P3902. 递增
递增
Description
Given numbers , modify the fewest elements (to real values) so that the sequence becomes strictly increasing.
Note: The original statement mistakenly said to modify to integers; it has now been corrected to real numbers. The testdata ensures that the integer approach would also AC (it just cannot pass the sample).
Input Format
The first line contains an integer .
The second line contains integers .
Output Format
Output one integer, the minimum number of elements to modify.
3
1 3 2
1
8
1 2 3 4 4 5 6 7
1
Hint
- Constraints:
- For 50% of the testdata, .
- For 100% of the testdata, , .
Translated by ChatGPT 5
京公网安备 11011102002149号