Costly Summit
Chef is going to meet $N$ people. Each person speaks one of the five languages: $A$, $B$, $C$, $D$, or $E$. Chef does not know any language at the start. To communicate, he has two options: - Chef can learn a language for a fixed cost $C$. Once he learns a language, he can talk with everyone who speaks that language. - Chef can hire a translator to help him. The cost of hiring a translator goes up
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