← All problemsSign in

Satisfying Gourmets

Remy, a chef, is preparing a dish for a group of food reviewers. The dish requires $n$ ingredients, but Remy knows that these reviewers are picky, and a bad review could cost him his career. In specific, for each ingredient, Remy has two brands of that particular ingredient, and he knows that the reviewers dislike $k$ pairs of brands from different ingredients being put together in the same dish.

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