← All problemsSign in

Jumping Robot

A city has $N$ streets numbered from $0$ to $N-1$. The organization of the city is given to us as a string $S$ of length $N$ (with only lowercase letters) where the ith position represents the ith street (i starts from $0$). In each street, there are only *S[i]*th types of houses. A newspaper agency has to deliver their newspapers to each house of all the streets. The agency decides to provide $

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