P18691 [HackerEarth] Problem Statement:
普及
题目描述

Problem Statement:

Zark is a novice coder, who is obsessed with sequential problems. One fine day,
Zark's friend King gave him a sequence of integers and asked him to write a
code to find the minimum number of changes required to make the sequence strictly increasing (consisting of positive integers only).

Your task is to help Zark find out the minimum number of changes.

Note: You can replace any number with a positive integer.

INPUT SPECIFICATION:

You will be given 't' test cases, each test case will consist of a number 'n' denoting the

length of sequence (no. of elements in sequence). The next line will consist of array of

elements 'a[i]' of the given sequence.

CONSTRAINTS:

n < 10^6

a[i] < 10^9

OUTPUT SPECIFICATION:

The output for each test case will consist of single line denoting the minimum number of changes required.

SAMPLE INPUT
6
7 4 5 9 0 11

SAMPLE OUTPUT
2

输入格式

见题面

输出格式

见题面

样例输入
7 -9 -7 3 76 -98 0 0
样例输出
4