← All problemsSign in

Maximise the Tastiness

CodeChefRating 627Open on judge ↗

Chef is making a dish that consists of exactly two ingredients. He has four ingredients $A, B, C$ and $D$ with tastiness $a, b, c,$ and $d$ respectively. He can use either $A$ or $B$ as the first ingredient and either $C$ or $D$ as the second ingredient. The tastiness of a dish is the sum of tastiness of its ingredients. Find the **maximum** possible tastiness of the dish that the chef can prepa

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