Chef dish
CodeChefOpen on judge ↗
Chef is cooking another interesting dish. To prepare one dish chef needs $4$ ingredients in $w$, $x$, $y$, $z$ amounts. And chef's kitchen has $p$, $q$, $r$, $s$ amounts of ingredients respectively. He also have $A$ amount of money. He can spend 1 money to purchase 1 quantity of any ingredients. So chef wants to know maximum how many dishes he can prepare. ### Input - First line will contain $T$
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