Rabbo Loves Jumping
CodeChefOpen on judge ↗
Rabbo is your friend who is a rabbit. There are n carrots in the garden. And being a rabbit Rabbo loves carrot. But he has a unique problem in jumping i.e., he can only jump D units, which he can decide only once before the first jump. He wishes to eat all the carrots in the garden. Carrot i is situated at coordinate ai. You are currently at coordinate X. From any coordinate y, you can go to
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.
Sign in to chat with the tutor and save your progress.
Sign in to start