Buying Chairs
Chef is redecorating his house, and is now trying to decide which chairs to buy. The furniture store Chef is visiting has $W$ wooden chairs and $P$ plastic chairs available. Chef believes that each wooden chair will increase the *stylishness* of his house by $2$, while each plastic chair will increase the *stylishness* of his house by $1$. Chef wants to buy exactly $K$ chairs in total. It is
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