Chef at the Food Fair
A food fair is being organised in Chef's town. $N$ booths were set up in a straight line and numbered $1$ through $N$. For each $i$ ($1 \le i \le N$), the probability with which the food served at booth $i$ will cause food poisoning at the beginning of the day is $P_i$. Over the course of the day, the Chef observes that certain booths might decide to offer less unhealthy food based on feedback fr
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