← All problemsSign in

Coloured Marbles

Raghav dreams that he is in a shop with an infinite amount of marbles. He is allowed to select n number of marbles. There are marbles of k different colors. From each color there are also infinitely many marbles. Raghav wants that he should have at least one marble of each color, but still there are a lot of possibilities for his selection. In his efforts to settle on a choice he awakens. Now he a

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