Good Dish#11841

Good Dish (Editorial)

A single good dish requires two distinct meat portions and one cheese portion. Thus dishes consume meat portions and cheese portions. Constraints:

\begin{cases} 2k \le a+b+c, &\text{(total meat available)},\\ k \le (a+b+c)-\max\{a,b,c\}, &\text{(no meat portion reused)},\\ k \le d, &\text{(cheese available)}. \end{cases}

Let

s=a+b+c, \qquad M=\max\{a,b,c\}.

The two upper bounds on meat are ( s/2) and ( s-M ), hence the effective meat bound is

Combining with cheese:

k=\min\!\Bigl(d,\;\min(\lfloor s/2\rfloor,\;s-M)\Bigr).

Unused portions in total:

R=(a+b+c+d)-3k.