atcoder B - Frog 2 (DP)
B - Frog 2
Time Limit: 2 sec / Memory Limit: 1024 MB
Score : 100100 points
Problem Statement
There are NN stones, numbered 1,2,…,N1,2,…,N. For each ii (1≤i≤N1≤i≤N), the height of Stone ii is
There is a frog who is initially on Stone 11. He will repeat the following action some number of times to reach Stone NN:
- If the frog is currently on Stone ii, jump to one of the following: Stone i+1,i+2,…,i+Ki+1,i+2,…,i+K. Here, a cost of