All Submissions


Statement
An array A of N elements are given. Each element in array represents max distance that can be covered from that element in just one jump. You have to reach the nth element in minimum no of jumps.

First line of input contains no. of test cases T
First line of each test case contains N
N integers of array A follows
Input

1
9
3 2 2 1 5 6 4 1 2

Output

3

Constraints

t <= 100
n <= 10000
1 <= A(i) <= 1000


Languages: Brain,C,C++,Java,Pascal,Perl,PHP,Python,Ruby,Text

Time Limit: 0.25 Second(s)
Score: 0 Point(s)
Input File Limit: 50000 Bytes

Submit

Login to post clarification.

No Clarifications.

Contest

Mode Judge

Passive

Online

Overall Rankings

RankNameScore
1xyz0
2Ams0
3TIP0
4team420
5xyzz0
6asdasdasd0
7abcd0
8khankhan0
9Gabriel0
10gigel0