← All problemsSign in

808. Soup Servings

LeetCodeMathDynamic ProgrammingProbability and StatisticsOpen on judge ↗

You have two soups, A and B, each starting with n mL. On every turn, one of the following four serving operations is chosen at random, each with probability 0.25 independent of all previous turns: - pour 100 mL from type A and 0 mL from type B - pour 75 mL from type A and 25 mL from type B - pour 50 mL from type A and 50 mL from type B - pour 25 mL from type A and 75 mL from type B Note: - 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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start