Rohan And His House
CodeChefOpen on judge ↗
Problem description. Today Rohan lost his way back to home in the woods . He wants to go back to his home . He is n distance away from his home . He can reach his way back by jumping through the woods . He can make either a 2 distance jump or a 3 distance jump . He will make a 2 distance jump with probability p , else he will make a 3 distance jump . What is the expected time for Rohan to reach
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