← All problemsSign in

Chef And Colors

Problem Statement Chef and his brother Bakku has N balls each. It is also known that both of them also have equal number of distinct colored balls. There are 2 special balls, out of which any one is randomly given to Chef and other is given to Bakku. Help Chef to find number of ways to color all 2*N+2 balls with K colors before distributing special balls so that both of them have equal number of

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