← All problemsSign in

Movie Festival

Movie Festival This weekend Gopal is going for a movie festival and he wants to watch exactly 3 movies. Gopal should spend Rs. Ci to watch i th movie. Now he got only Rs. K and he wants to spend that optimally. Gopal want to know in how many ways he can select 3 movies such that they cost exactly Rs. K in total. Two ways are considered same if the same set of movies are chosen in different order.

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