← All problemsSign in

Jumping Frogs III

At time 0, **R** red frogs and **G** green frogs are sitting on a straight line. Every frog can be described with an integer number **P**, denoting its initial position and a non-negative integer **V**, denoting its velocity. Every second, a green frog jumps from its position to its left and a red frog jumps to its right. So if the initial position of a green frog is **0** and its velocity is **5

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