kjk81's garden

Home

❯

Algorithms

❯

Problems

❯

Frog Jumps

Frog Jumps

Jan 23, 20261 min read

  • DynamicProgramming

https://codeforces.com/contest/2189/problem/B https://www.youtube.com/watch?v=hoHMl95kzwU

First approach

dp problem

minimize number of rollbacks

n choices each step jump(x)

there’s a lot of variability can choose from n jumps can choose up to ai​ distance covered (which actually doesnt matter that much, just allows reaching of position x)

need to track attempts per jump type (just an array) update

what’s the recursive function??


Graph View

kjk81's garden

    made with Quartz v4.5.2 © 2026
  • GitHub