← All problemsSign in

YJump

You are playing a game called yjump. There are N levels. Each level has a tile. The x-coordinate of the tile in level i is xi. You start at level 1, so you are at x1 in the beginning. Then you will jump to the tile at position x2, then x3 and so on. So overall, from level i, you can only advance to level i + 1. You are not allowed to skip any level. Also you can jump at most a distance of K in on

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start