Minimum cost to reach end
contest is over , please tell me how to solve

1 Like

This is problem Z from AtCoder Educational DP contest. IIRC, it was an application of Convex Hull Trick. Iā€™m not familiar with this trick, but you can write the recurrence and expand the expression and see where that goes.

1 Like

Whats the contest number?

Link to problem: Frog 3


contest number 2