Angry Chef
CodeChefOpen on judge ↗
This morning Chef woke up with an uncontrollable urge to send a text message. But, can you believe it? His new phone just crashed and all of the words are missing from its dictionary! There used to be $N$ words in there, and he certainly doesn't have time to add all of them back right now. His plan is to just choose $K$ distinct words of the $N$ possible words, add them to the phone's dictionary,
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