dp for frog jump