Drunk Monocarp
CodeChefOpen on judge ↗
Monocarp is taking part in a drunkard race. The race takes $N$ steps to finish. But he is a very special type of drunkard. When he haves a little too much of his favorite drink, he walks in a very special pattern $A_1, A_2, A_3 ... A_k$. He starts walking, takes $A_1$ steps and then stops abruptly for no reason at all, then he starts walking again and takes $A_2$ steps and so on... If he still h
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