C
Problem Statement
1
There are N stones, numbered 1,2,...,N. For each i (1 <=i<=N).
the height of the stone i is hi. Here, h1 <h2<... <HN holds.
W N punda
2
4
5
There is a frog who is initially on Stone 1. He will repeat the
following action some number of times to reach Stone N:
6
7
8
The frog that is currently on Stone i can jump to one of the
following stones - i+1,i+2...N such that a cost of (hj-hi) + Cis
incurred, where j is the stone to land on.
9
10
Find the minimum possible total cost incurred before the frog
reaches Stone N.
Constraints
Answers
Answered by
3
Answer:
ho
Explanation:
- its to big question
its can't understand
Similar questions