← All problemsSign in

Sudesh and Contest

Sudesh is solving a contest and wants to solve the nth question. But the coding platform allows him to solve ith question only if one of the condition is satisfied : 1) he has solved any one of the question number (i-1) , (i-2) or (i-3) Or 2) i-3 <= 0 So now Sudesh wants to calculate number of ways in which he can solve nth question. Way1 and way2 are considered to be different if way 1 has one o

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