Long Jumps
EasyRating 1100Codeforces1-D Dynamic Programming
Approach hintTry it first, then revealHide
Process indices from right to left: the score from index i is a[i] plus the score from i + a[i] when that index is still inside the array. The answer is the maximum over all starts.